Add layout tests for audio codecs
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2012 21:45:37 +0000 (21:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2012 21:45:37 +0000 (21:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=88794

Patch by Raymond Toy <rtoy@google.com> on 2012-06-25
Reviewed by Chris Rogers.

New tests and expected results
* webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Added.
* webaudio/codec-tests/aac/vbr-128kbps-44khz.html: Added.
* webaudio/codec-tests/mp3/128kbps-44khz-expected.wav: Added.
* webaudio/codec-tests/mp3/128kbps-44khz.html: Added.
* webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.wav: Added.
* webaudio/codec-tests/vorbis/vbr-128kbps-44khz.html: Added.
* webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.wav: Added.
* webaudio/codec-tests/vorbis/vbr-70kbps-44khz.html: Added.
* webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.wav: Added.
* webaudio/codec-tests/vorbis/vbr-96kbps-44khz.html: Added.
* webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav: Added.
* webaudio/codec-tests/wav/24bit-22khz-resample.html: Added.
* webaudio/codec-tests/wav/24bit-44khz-expected.wav: Added.
* webaudio/codec-tests/wav/24bit-44khz.html: Added.
* webaudio/resources/audio-codec-test.js: Added.
(runDecodingTest):
(finishedLoading):

Media files for the tests
* webaudio/resources/media/128kbps-44khz.mp3: Added.
* webaudio/resources/media/24bit-22khz.wav: Added.
* webaudio/resources/media/24bit-44khz.wav: Added.
* webaudio/resources/media/vbr-128kbps-44khz.m4a: Added.
* webaudio/resources/media/vbr-128kbps-44khz.ogg: Added.
* webaudio/resources/media/vbr-70kbps-44khz.ogg: Added.
* webaudio/resources/media/vbr-96kbps-44khz.ogg: Added.

Platform-specific expected results
* platform/chromium-linux/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Added.
* platform/chromium-linux/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav: Added.
* platform/chromium-linux/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav: Added.
* platform/chromium-mac/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Added.
* platform/chromium-mac/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav: Added.
* platform/chromium-win/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Added.
* platform/chromium-win/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav: Added.
* platform/chromium-win/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav: Added.

New test expectations
* platform/chromium/TestExpectations: Disable aac/mp3 tests until bots have support.
* platform/efl/TestExpectations: Disable all webaudio codec tests
* platform/gtk/TestExpectations: Disable all webaudio codec tests
* platform/mac/TestExpectations: Disable all webaudio codec tests
* platform/qt/TestExpectations: Disable all webaudio codec tests

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121182 268f45cc-cd09-0410-ab3c-d52691b4dbfc

36 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium-linux/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/platform/chromium-linux/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/platform/chromium-linux/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav [new file with mode: 0644]
LayoutTests/platform/chromium-mac/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/platform/chromium-mac/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/platform/chromium-win/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/platform/chromium-win/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/platform/chromium-win/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/qt/TestExpectations
LayoutTests/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/aac/vbr-128kbps-44khz.html [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/mp3/128kbps-44khz.html [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/vorbis/vbr-128kbps-44khz.html [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/vorbis/vbr-70kbps-44khz.html [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.wav [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/vorbis/vbr-96kbps-44khz.html [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/wav/24bit-22khz-resample.html [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/wav/24bit-44khz-expected.wav [new file with mode: 0644]
LayoutTests/webaudio/codec-tests/wav/24bit-44khz.html [new file with mode: 0644]
LayoutTests/webaudio/resources/audio-codec-test.js [new file with mode: 0644]
LayoutTests/webaudio/resources/media/128kbps-44khz.mp3 [new file with mode: 0644]
LayoutTests/webaudio/resources/media/24bit-22khz.wav [new file with mode: 0644]
LayoutTests/webaudio/resources/media/24bit-44khz.wav [new file with mode: 0644]
LayoutTests/webaudio/resources/media/vbr-128kbps-44khz.m4a [new file with mode: 0644]
LayoutTests/webaudio/resources/media/vbr-128kbps-44khz.ogg [new file with mode: 0644]
LayoutTests/webaudio/resources/media/vbr-70kbps-44khz.ogg [new file with mode: 0644]
LayoutTests/webaudio/resources/media/vbr-96kbps-44khz.ogg [new file with mode: 0644]

index ab52f9c..df1ee2c 100644 (file)
@@ -1,3 +1,55 @@
+2012-06-25  Raymond Toy  <rtoy@google.com>
+
+        Add layout tests for audio codecs
+        https://bugs.webkit.org/show_bug.cgi?id=88794
+
+        Reviewed by Chris Rogers.
+
+        New tests and expected results
+        * webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Added.
+        * webaudio/codec-tests/aac/vbr-128kbps-44khz.html: Added.
+        * webaudio/codec-tests/mp3/128kbps-44khz-expected.wav: Added.
+        * webaudio/codec-tests/mp3/128kbps-44khz.html: Added.
+        * webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.wav: Added.
+        * webaudio/codec-tests/vorbis/vbr-128kbps-44khz.html: Added.
+        * webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.wav: Added.
+        * webaudio/codec-tests/vorbis/vbr-70kbps-44khz.html: Added.
+        * webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.wav: Added.
+        * webaudio/codec-tests/vorbis/vbr-96kbps-44khz.html: Added.
+        * webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav: Added.
+        * webaudio/codec-tests/wav/24bit-22khz-resample.html: Added.
+        * webaudio/codec-tests/wav/24bit-44khz-expected.wav: Added.
+        * webaudio/codec-tests/wav/24bit-44khz.html: Added.
+        * webaudio/resources/audio-codec-test.js: Added.
+        (runDecodingTest):
+        (finishedLoading):
+
+        Media files for the tests
+        * webaudio/resources/media/128kbps-44khz.mp3: Added.
+        * webaudio/resources/media/24bit-22khz.wav: Added.
+        * webaudio/resources/media/24bit-44khz.wav: Added.
+        * webaudio/resources/media/vbr-128kbps-44khz.m4a: Added.
+        * webaudio/resources/media/vbr-128kbps-44khz.ogg: Added.
+        * webaudio/resources/media/vbr-70kbps-44khz.ogg: Added.
+        * webaudio/resources/media/vbr-96kbps-44khz.ogg: Added.
+
+        Platform-specific expected results
+        * platform/chromium-linux/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Added.
+        * platform/chromium-linux/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav: Added.
+        * platform/chromium-linux/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav: Added.
+        * platform/chromium-mac/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Added.
+        * platform/chromium-mac/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav: Added.
+        * platform/chromium-win/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Added.
+        * platform/chromium-win/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav: Added.
+        * platform/chromium-win/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav: Added.
+
+        New test expectations
+        * platform/chromium/TestExpectations: Disable aac/mp3 tests until bots have support.
+        * platform/efl/TestExpectations: Disable all webaudio codec tests
+        * platform/gtk/TestExpectations: Disable all webaudio codec tests
+        * platform/mac/TestExpectations: Disable all webaudio codec tests
+        * platform/qt/TestExpectations: Disable all webaudio codec tests
+
 2012-06-25  Huang Dongsung  <luxtella@company100.net>
 
         [Texmap] TextureMapperPaintOptions should keep current surface.
diff --git a/LayoutTests/platform/chromium-linux/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav b/LayoutTests/platform/chromium-linux/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..3becb87
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav differ
diff --git a/LayoutTests/platform/chromium-linux/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav b/LayoutTests/platform/chromium-linux/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..c6e6a0c
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav differ
diff --git a/LayoutTests/platform/chromium-linux/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav b/LayoutTests/platform/chromium-linux/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav
new file mode 100644 (file)
index 0000000..352e6f2
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav differ
diff --git a/LayoutTests/platform/chromium-mac/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav b/LayoutTests/platform/chromium-mac/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..98c39a7
Binary files /dev/null and b/LayoutTests/platform/chromium-mac/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav differ
diff --git a/LayoutTests/platform/chromium-mac/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav b/LayoutTests/platform/chromium-mac/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..0c04bf7
Binary files /dev/null and b/LayoutTests/platform/chromium-mac/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav differ
diff --git a/LayoutTests/platform/chromium-win/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav b/LayoutTests/platform/chromium-win/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..9af43f7
Binary files /dev/null and b/LayoutTests/platform/chromium-win/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav differ
diff --git a/LayoutTests/platform/chromium-win/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav b/LayoutTests/platform/chromium-win/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..0c04bf7
Binary files /dev/null and b/LayoutTests/platform/chromium-win/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav differ
diff --git a/LayoutTests/platform/chromium-win/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav b/LayoutTests/platform/chromium-win/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav
new file mode 100644 (file)
index 0000000..c0df5e9
Binary files /dev/null and b/LayoutTests/platform/chromium-win/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav differ
index a0ec063..4e4aaa3 100644 (file)
@@ -3708,6 +3708,10 @@ BUGWK88131 DEBUG : fast/dom/HTMLMeterElement/meter-element-crash.html = PASS TEX
 
 BUGWK67116 DEBUG : compositing/layer-creation/overflow-scroll-overlap.html = PASS TEXT
 
+// Skip test of proprietary codecs until they're enabled on the bots.
+BUGWK88794 SKIP : webaudio/codec-tests/aac = PASS
+BUGWK88794 SKIP : webaudio/codec-tests/mp3 = PASS
+
 BUGCR131687 RELEASE : fast/js/dfg-double-vote-fuzz.html = PASS TEXT
 
 BUGWK88593 : fast/table/multiple-captions-display.xhtml = PASS IMAGE IMAGE+TEXT
index 6d05b86..56c6ab5 100644 (file)
@@ -128,6 +128,9 @@ BUGWK86080 SKIP : fast/encoding/idn-security.html = TEXT
 // UndoManager is not yet enabled.
 BUGWK87908 SKIP : editing/undomanager = PASS
 
+// Disable webaudio codec tests, including proprietary codecs.
+BUGWK88794 SKIP : webaudio/codec-tests = PASS
+
 //////////////////////////////////////////////////////////////////////////////////////////
 // CRASHES
 //////////////////////////////////////////////////////////////////////////////////////////
index 329c6a3..0ebdb86 100644 (file)
@@ -336,6 +336,9 @@ BUGWK31508 SKIP : storage/websql/transaction-callback-isolated-world.html = TEXT
 BUGWK31508 SKIP : storage/websql/transaction-error-callback-isolated-world.html = TEXT
 BUGWK31508 SKIP : storage/websql/transaction-success-callback-isolated-world.html = TEXT
 
+// Disable webaudio codec tests, including proprietary codecs.
+BUGWK88794 SKIP : webaudio/codec-tests = PASS
+
 //////////////////////////////////////////////////////////////////////////////////////////
 // End of Expected failures
 //////////////////////////////////////////////////////////////////////////////////////////
index 84ae809..9dec4f9 100644 (file)
@@ -275,3 +275,7 @@ BUG_OJAN : tables/mozilla/bugs/bug131020.html = TEXT IMAGE IMAGE+TEXT
 BUGWK85918 : compositing/backface-visibility/backface-visibility-3d.html = IMAGE
 BUGWK85918 : compositing/backface-visibility/backface-visibility-hierarchical-transform.html = IMAGE
 BUGWK85918 : compositing/backface-visibility/backface-visibility-non3d.html = IMAGE
+
+// Disable webaudio codec tests, including proprietary codecs.
+BUGWK88794 SKIP : webaudio/codec-tests = PASS
+
index 90bad8d..4760254 100644 (file)
@@ -96,3 +96,6 @@ BUG_OJAN : tables/mozilla/bugs/bug131020.html = PASS TEXT IMAGE IMAGE+TEXT
 
 // LayoutTestController::setAutomaticLinkDetectionEnabled isn't implemented
 BUGWK85463 SKIP : editing/inserting/typing-space-to-trigger-smart-link.html = PASS
+
+// Disable webaudio codec tests, including proprietary codecs.
+BUGWK88794 SKIP : webaudio/codec-tests = PASS
diff --git a/LayoutTests/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav b/LayoutTests/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..3becb87
Binary files /dev/null and b/LayoutTests/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav differ
diff --git a/LayoutTests/webaudio/codec-tests/aac/vbr-128kbps-44khz.html b/LayoutTests/webaudio/codec-tests/aac/vbr-128kbps-44khz.html
new file mode 100644 (file)
index 0000000..f177e80
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+
+<html>
+  <head>
+    <script type="text/javascript" src="../../resources/audio-codec-test.js"></script>
+    <script type="text/javascript" src="../../resources/audio-testing.js"></script>
+    <script type="text/javascript" src="../../resources/buffer-loader.js"></script>
+    <script>
+      var url = "../../resources/media/vbr-128kbps-44khz.m4a";
+
+      window.onload = function () { runDecodingTest(url) };
+    </script>
+  </head>
+  <body>
+  </body>
+</html>
diff --git a/LayoutTests/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav b/LayoutTests/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..c6e6a0c
Binary files /dev/null and b/LayoutTests/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav differ
diff --git a/LayoutTests/webaudio/codec-tests/mp3/128kbps-44khz.html b/LayoutTests/webaudio/codec-tests/mp3/128kbps-44khz.html
new file mode 100644 (file)
index 0000000..4968a37
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+
+<html>
+  <head>
+    <script type="text/javascript" src="../../resources/audio-codec-test.js"></script>
+    <script type="text/javascript" src="../../resources/audio-testing.js"></script>
+    <script type="text/javascript" src="../../resources/buffer-loader.js"></script>
+    <script>
+      var url = "../../resources/media/128kbps-44khz.mp3";
+
+      window.onload = function () { runDecodingTest(url) };
+    </script>
+  </head>
+  <body>
+  </body>
+</html>
diff --git a/LayoutTests/webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.wav b/LayoutTests/webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..572ceea
Binary files /dev/null and b/LayoutTests/webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.wav differ
diff --git a/LayoutTests/webaudio/codec-tests/vorbis/vbr-128kbps-44khz.html b/LayoutTests/webaudio/codec-tests/vorbis/vbr-128kbps-44khz.html
new file mode 100644 (file)
index 0000000..0ea2b98
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+
+<html>
+  <head>
+    <script type="text/javascript" src="../../resources/audio-codec-test.js"></script>
+    <script type="text/javascript" src="../../resources/audio-testing.js"></script>
+    <script type="text/javascript" src="../../resources/buffer-loader.js"></script>
+    <script>
+      var url = "../../resources/media/vbr-128kbps-44khz.ogg";
+
+      window.onload = function () { runDecodingTest(url) };
+    </script>
+  </head>
+  <body>
+  </body>
+</html>
diff --git a/LayoutTests/webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.wav b/LayoutTests/webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..00774b0
Binary files /dev/null and b/LayoutTests/webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.wav differ
diff --git a/LayoutTests/webaudio/codec-tests/vorbis/vbr-70kbps-44khz.html b/LayoutTests/webaudio/codec-tests/vorbis/vbr-70kbps-44khz.html
new file mode 100644 (file)
index 0000000..4ef2aff
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+
+<html>
+  <head>
+    <script type="text/javascript" src="../../resources/audio-codec-test.js"></script>
+    <script type="text/javascript" src="../../resources/audio-testing.js"></script>
+    <script type="text/javascript" src="../../resources/buffer-loader.js"></script>
+    <script>
+      var url = "../../resources/media/vbr-70kbps-44khz.ogg";
+
+      window.onload = function () { runDecodingTest(url) };
+    </script>
+  </head>
+  <body>
+  </body>
+</html>
diff --git a/LayoutTests/webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.wav b/LayoutTests/webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.wav
new file mode 100644 (file)
index 0000000..94f573f
Binary files /dev/null and b/LayoutTests/webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.wav differ
diff --git a/LayoutTests/webaudio/codec-tests/vorbis/vbr-96kbps-44khz.html b/LayoutTests/webaudio/codec-tests/vorbis/vbr-96kbps-44khz.html
new file mode 100644 (file)
index 0000000..cc7b60e
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+
+<html>
+  <head>
+    <script type="text/javascript" src="../../resources/audio-codec-test.js"></script>
+    <script type="text/javascript" src="../../resources/audio-testing.js"></script>
+    <script type="text/javascript" src="../../resources/buffer-loader.js"></script>
+    <script>
+      var url = "../../resources/media/vbr-96kbps-44khz.ogg";
+
+      window.onload = function () { runDecodingTest(url) };
+    </script>
+  </head>
+  <body>
+  </body>
+</html>
diff --git a/LayoutTests/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav b/LayoutTests/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav
new file mode 100644 (file)
index 0000000..352e6f2
Binary files /dev/null and b/LayoutTests/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav differ
diff --git a/LayoutTests/webaudio/codec-tests/wav/24bit-22khz-resample.html b/LayoutTests/webaudio/codec-tests/wav/24bit-22khz-resample.html
new file mode 100644 (file)
index 0000000..ebf9f80
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+
+<html>
+  <head>
+    <script type="text/javascript" src="../../resources/audio-codec-test.js"></script>
+    <script type="text/javascript" src="../../resources/audio-testing.js"></script>
+    <script type="text/javascript" src="../../resources/buffer-loader.js"></script>
+    <script>
+      // Test 24bit WAV decoder, 22.05 kHz sample rate.  This also tests the resampler because the
+      // context is running at 44.1 kHz.
+      var url = "../../resources/media/24bit-22khz.wav";
+
+      window.onload = function () { runDecodingTest(url) };
+    </script>
+  </head>
+  <body>
+  </body>
+</html>
diff --git a/LayoutTests/webaudio/codec-tests/wav/24bit-44khz-expected.wav b/LayoutTests/webaudio/codec-tests/wav/24bit-44khz-expected.wav
new file mode 100644 (file)
index 0000000..8587908
Binary files /dev/null and b/LayoutTests/webaudio/codec-tests/wav/24bit-44khz-expected.wav differ
diff --git a/LayoutTests/webaudio/codec-tests/wav/24bit-44khz.html b/LayoutTests/webaudio/codec-tests/wav/24bit-44khz.html
new file mode 100644 (file)
index 0000000..34c6bc9
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+
+<html>
+  <head>
+    <script type="text/javascript" src="../../resources/audio-codec-test.js"></script>
+    <script type="text/javascript" src="../../resources/audio-testing.js"></script>
+    <script type="text/javascript" src="../../resources/buffer-loader.js"></script>
+    <script>
+      var url = "../../resources/media/24bit-44khz.wav";
+
+      window.onload = function () { runDecodingTest(url) };
+    </script>
+  </head>
+  <body>
+  </body>
+</html>
diff --git a/LayoutTests/webaudio/resources/audio-codec-test.js b/LayoutTests/webaudio/resources/audio-codec-test.js
new file mode 100644 (file)
index 0000000..b6520e8
--- /dev/null
@@ -0,0 +1,34 @@
+var defaultSampleRate = 44100.0;
+var lengthInSeconds = 1;
+
+var context = 0;
+var bufferLoader = 0;
+
+// Run test by loading the file specified by |url|.  An optional sample rate can be given to
+// select a context with a different sample rate.  The default value is |defaultSampleRate|.
+function runDecodingTest(url, optionalSampleRate) 
+{
+    if (!window.layoutTestController)
+        return;
+
+    var sampleRate = (typeof optionalSampleRate === "undefined") ? defaultSampleRate : optionalSampleRate;
+
+    // Create offline audio context.
+    context = new webkitAudioContext(1, sampleRate * lengthInSeconds, sampleRate);
+    
+    bufferLoader = new BufferLoader(
+        context,
+        [ url ],
+        finishedLoading
+    );
+    
+    bufferLoader.load();
+    layoutTestController.waitUntilDone();
+}
+
+function finishedLoading(bufferList)
+{
+    layoutTestController.setAudioData(createAudioData(bufferList[0]));
+    layoutTestController.notifyDone();
+}
+
diff --git a/LayoutTests/webaudio/resources/media/128kbps-44khz.mp3 b/LayoutTests/webaudio/resources/media/128kbps-44khz.mp3
new file mode 100644 (file)
index 0000000..43a8ac3
Binary files /dev/null and b/LayoutTests/webaudio/resources/media/128kbps-44khz.mp3 differ
diff --git a/LayoutTests/webaudio/resources/media/24bit-22khz.wav b/LayoutTests/webaudio/resources/media/24bit-22khz.wav
new file mode 100644 (file)
index 0000000..38ce8b3
Binary files /dev/null and b/LayoutTests/webaudio/resources/media/24bit-22khz.wav differ
diff --git a/LayoutTests/webaudio/resources/media/24bit-44khz.wav b/LayoutTests/webaudio/resources/media/24bit-44khz.wav
new file mode 100644 (file)
index 0000000..4901563
Binary files /dev/null and b/LayoutTests/webaudio/resources/media/24bit-44khz.wav differ
diff --git a/LayoutTests/webaudio/resources/media/vbr-128kbps-44khz.m4a b/LayoutTests/webaudio/resources/media/vbr-128kbps-44khz.m4a
new file mode 100644 (file)
index 0000000..9ef6651
Binary files /dev/null and b/LayoutTests/webaudio/resources/media/vbr-128kbps-44khz.m4a differ
diff --git a/LayoutTests/webaudio/resources/media/vbr-128kbps-44khz.ogg b/LayoutTests/webaudio/resources/media/vbr-128kbps-44khz.ogg
new file mode 100644 (file)
index 0000000..8d18921
Binary files /dev/null and b/LayoutTests/webaudio/resources/media/vbr-128kbps-44khz.ogg differ
diff --git a/LayoutTests/webaudio/resources/media/vbr-70kbps-44khz.ogg b/LayoutTests/webaudio/resources/media/vbr-70kbps-44khz.ogg
new file mode 100644 (file)
index 0000000..c569c8f
Binary files /dev/null and b/LayoutTests/webaudio/resources/media/vbr-70kbps-44khz.ogg differ
diff --git a/LayoutTests/webaudio/resources/media/vbr-96kbps-44khz.ogg b/LayoutTests/webaudio/resources/media/vbr-96kbps-44khz.ogg
new file mode 100644 (file)
index 0000000..3af3962
Binary files /dev/null and b/LayoutTests/webaudio/resources/media/vbr-96kbps-44khz.ogg differ