Title: [268685] trunk/LayoutTests/imported/w3c
Revision
268685
Author
[email protected]
Date
2020-10-19 14:06:47 -0700 (Mon, 19 Oct 2020)

Log Message

Resync web-platform-tests/webaudio from upstream
https://bugs.webkit.org/show_bug.cgi?id=217909

Reviewed by Eric Carlson.

Resync web-platform-tests/webaudio from upstream 357b8f6365d9080a06.

* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https-expected.txt:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https.html:
* web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-promises.https.html:
* web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html:
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/transferred-buffer-output-expected.txt: Added.
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/transferred-buffer-output.html: Added.
* web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/w3c-import.log:
* web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.tentative.html:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (268684 => 268685)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-10-19 20:42:32 UTC (rev 268684)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-10-19 21:06:47 UTC (rev 268685)
@@ -1,3 +1,21 @@
+2020-10-19  Chris Dumez  <[email protected]>
+
+        Resync web-platform-tests/webaudio from upstream
+        https://bugs.webkit.org/show_bug.cgi?id=217909
+
+        Reviewed by Eric Carlson.
+
+        Resync web-platform-tests/webaudio from upstream 357b8f6365d9080a06.
+
+        * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https-expected.txt:
+        * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https.html:
+        * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-promises.https.html:
+        * web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html:
+        * web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/transferred-buffer-output-expected.txt: Added.
+        * web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/transferred-buffer-output.html: Added.
+        * web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/w3c-import.log:
+        * web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.tentative.html:
+
 2020-10-19  Martin Robinson  <[email protected]>
 
         axis in scroll-snap-type should be required

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https-expected.txt (268684 => 268685)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https-expected.txt	2020-10-19 20:42:32 UTC (rev 268684)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https-expected.txt	2020-10-19 21:06:47 UTC (rev 268685)
@@ -1,6 +1,4 @@
 
-Harness Error (FAIL), message = 1 duplicate test name: "  Creating AudioWorkletNode with channelCountMode "foobar" threw TypeError: "Type error"."
-
 PASS # AUDIT TASK RUNNER STARTED.
 PASS Executing "setup"
 PASS Executing "without-audio-node-options"
@@ -42,7 +40,7 @@
 PASS > [channel-interpretation]
 PASS   testNode.channelInterpretation (set via options.speakers) is equal to speakers.
 PASS   testNode.channelInterpretation (set via options.discrete) is equal to discrete.
-PASS   Creating AudioWorkletNode with channelCountMode "foobar" threw TypeError: "Type error".
+PASS   Creating AudioWorkletNode with channelInterpretation "foobar" threw TypeError: "Type error".
 PASS < [channel-interpretation] All assertions passed. (total 3 assertions)
 PASS # AUDIT TASK RUNNER FINISHED: 6 tasks ran successfully.
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https.html (268684 => 268685)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https.html	2020-10-19 20:42:32 UTC (rev 268684)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https.html	2020-10-19 21:06:47 UTC (rev 268685)
@@ -137,7 +137,7 @@
         const options1 = {channelInterpretation: 'foobar'};
         should(
             () => new AudioWorkletNode(context, 'dummy', options1),
-            'Creating AudioWorkletNode with channelCountMode "foobar"')
+            'Creating AudioWorkletNode with channelInterpretation "foobar"')
             .throw(TypeError);
 
         task.done();

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-promises.https.html (268684 => 268685)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-promises.https.html	2020-10-19 20:42:32 UTC (rev 268684)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-promises.https.html	2020-10-19 21:06:47 UTC (rev 268685)
@@ -35,7 +35,7 @@
             node2.port._onmessage_ = resolve;
           });
           context.close();
-          assert_true(e.data == "ok",
+          assert_equals(e.data, "ok",
                       `Microtask checkpoints are performed
                        in between render quantum`);
         }, "test");

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html (268684 => 268685)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html	2020-10-19 20:42:32 UTC (rev 268684)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html	2020-10-19 21:06:47 UTC (rev 268685)
@@ -8,13 +8,13 @@
   var ac = new AudioContext();
 
   var csn = ac.createConstantSource();
-  assert_true(csn.offset.value == 1.0, "Default offset is 1.0");
+  assert_equals(csn.offset.value, 1.0, "Default offset is 1.0");
 
   csn = new ConstantSourceNode(ac);
-  assert_true(csn.offset.value == 1.0, "Default offset is 1.0");
+  assert_equals(csn.offset.value, 1.0, "Default offset is 1.0");
 
   csn = new ConstantSourceNode(ac, {offset: -0.25});
-  assert_true(csn.offset.value == -0.25, "Offset can be set during construction");
+  assert_equals(csn.offset.value, -0.25, "Offset can be set during construction");
 }, "ConstantSourceNode can be constructed");
 
 test(function(t) {
@@ -44,7 +44,7 @@
   csn.stop(1024/44100)
   csn._onended_ = function(e) {
     t.step(function() {
-      assert_true(e.type == "ended", "Event type should be 'ended', received: " + e.type);
+      assert_equals(e.type, "ended", "Event type should be 'ended', received: " + e.type);
     });
     t.done();
   }
@@ -63,9 +63,9 @@
       var result = e.renderedBuffer.getChannelData(0);
       for (var i = 0; i < 2048; ++i) {
         if (i >= 512 && i < 1024) {
-          assert_true(result[i] == 1.0, "sample " + i + " should equal 1.0");
+          assert_equals(result[i], 1.0, "sample " + i + " should equal 1.0");
         } else {
-          assert_true(result[i] == 0.0, "sample " + i + " should equal 0.0");
+          assert_equals(result[i], 0.0, "sample " + i + " should equal 0.0");
         }
       }
     });
@@ -86,7 +86,7 @@
     t.step(function() {
       var result = e.renderedBuffer.getChannelData(0);
       for (var i = 0; i < 2048; ++i) {
-        assert_true(result[i] == 0.25, "sample " + i + " should equal 0.25");
+        assert_equals(result[i], 0.25, "sample " + i + " should equal 0.25");
       }
     });
     t.done();

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/transferred-buffer-output-expected.txt (0 => 268685)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/transferred-buffer-output-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/transferred-buffer-output-expected.txt	2020-10-19 21:06:47 UTC (rev 268685)
@@ -0,0 +1,22 @@
+
+PASS # AUDIT TASK RUNNER STARTED.
+PASS Executing "Test Convolver with transferred buffer"
+PASS Audit report
+PASS > [Test Convolver with transferred buffer] Output should be all zeroes
+FAIL X Convolver channel 0 output[0:1279]: Expected 0 for all values but found 1280 unexpected values:
+	Index	Actual
+	[0]	1
+	[1]	2
+	[2]	3
+	[3]	4
+	...and 1276 more errors. assert_true: expected true got false
+FAIL X Convolver channel 1 output[0:1279]: Expected 0 for all values but found 1280 unexpected values:
+	Index	Actual
+	[0]	2
+	[1]	4
+	[2]	6
+	[3]	8
+	...and 1276 more errors. assert_true: expected true got false
+FAIL < [Test Convolver with transferred buffer] 2 out of 2 assertions were failed. assert_true: expected true got false
+FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed. assert_true: expected true got false
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/transferred-buffer-output.html (0 => 268685)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/transferred-buffer-output.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/transferred-buffer-output.html	2020-10-19 21:06:47 UTC (rev 268685)
@@ -0,0 +1,107 @@
+<!doctype html>
+<html>
+  <head>
+    <title>
+      Test Convolver Output with Transferred Buffer
+    </title>
+    <script src=""
+    <script src=""
+    <script src=""
+    <script src=""
+  </head>
+
+  <body>
+    <script>
+      // Arbitrary sample rate.
+      const sampleRate = 16000;
+
+      // Number of frames to render.  Just need to have at least 2 render
+      // quanta.
+      const lengthInFrames = 10 * RENDER_QUANTUM_FRAMES;
+
+      let audit = Audit.createTaskRunner();
+
+      // Buffer to use for the impulse response of a ConvolverNode.
+      let impulseBuffer;
+
+      // This sets up a worker to receive one channel of an AudioBuffer.
+      function setUpWorkerForTest() {
+        impulseBuffer = new AudioBuffer({
+          numberOfChannels: 2,
+          length: 2 * RENDER_QUANTUM_FRAMES,
+          sampleRate: sampleRate
+        });
+
+        // Just fill the buffer with a constant value; the contents shouldn't
+        // matter for this test since we're transferring one of the channels.
+        impulseBuffer.getChannelData(0).fill(1);
+        impulseBuffer.getChannelData(1).fill(2);
+
+        // We're going to transfer channel 0 to the worker, making it
+        // unavailable for the convolver
+        let data = ""
+
+        let string = [
+          '_onmessage_ = function(e) {', '    postMessage(\'done\');', '};'
+        ].join('\n');
+
+        let blobURL = URL.createObjectURL(new Blob([string]));
+        let worker = new Worker(blobURL);
+        worker._onmessage_ = workerReply;
+        worker.postMessage(data, [data]);
+      }
+
+      function workerReply() {
+        // Worker has received the message.  Run the test.
+        audit.run();
+      }
+
+      audit.define(
+          {
+            label: 'Test Convolver with transferred buffer',
+            description: 'Output should be all zeroes'
+          },
+          async (task, should) => {
+            // Two channels so we can capture the output of the convolver with a
+            // stereo convolver.
+            let context = new OfflineAudioContext({
+              numberOfChannels: 2,
+              length: lengthInFrames,
+              sampleRate: sampleRate
+            });
+
+            // Use a simple constant source so we easily check that the
+            // convolver output is correct.
+            let source = new ConstantSourceNode(context);
+
+            // Create the convolver with the desired impulse response and
+            // disable normalization so we can easily check the output.
+            let conv = new ConvolverNode(
+                context, {disableNormalization: true, buffer: impulseBuffer});
+
+            source.connect(conv).connect(context.destination);
+
+            source.start();
+
+            let renderedBuffer = await context.startRendering();
+
+            // Get the actual data
+            let c0 = renderedBuffer.getChannelData(0);
+            let c1 = renderedBuffer.getChannelData(1);
+
+            // Since one channel was transferred, we must behave as if all were
+            // transferred.  Hence, the output should be all zeroes for both
+            // channels.
+            should(c0, `Convolver channel 0 output[0:${c0.length - 1}]`)
+                .beConstantValueOf(0);
+
+            should(c1, `Convolver channel 1 output[0:${c1.length - 1}]`)
+                .beConstantValueOf(0);
+
+            task.done();
+          });
+
+      setUpWorkerForTest();
+    </script>
+  </body>
+</html>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/w3c-import.log (268684 => 268685)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/w3c-import.log	2020-10-19 20:42:32 UTC (rev 268684)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/w3c-import.log	2020-10-19 21:06:47 UTC (rev 268685)
@@ -26,3 +26,4 @@
 /LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-upmixing-1-channel-response.html
 /LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver.html
 /LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html
+/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/transferred-buffer-output.html

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.tentative.html (268684 => 268685)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.tentative.html	2020-10-19 20:42:32 UTC (rev 268684)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/offlineaudiocontext-detached-execution-context.tentative.html	2020-10-19 21:06:47 UTC (rev 268685)
@@ -19,7 +19,7 @@
 
         // Use the lowest value possible for the faster test.
         let context =
-            new iframe.contentWindow.OfflineAudioContext(1, 1, 3000);
+            new iframe.contentWindow.OfflineAudioContext(1, 1, 8000);
 
         document.body.removeChild(iframe);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to