Diff
Modified: trunk/LayoutTests/ChangeLog (274747 => 274748)
--- trunk/LayoutTests/ChangeLog 2021-03-19 23:36:22 UTC (rev 274747)
+++ trunk/LayoutTests/ChangeLog 2021-03-19 23:41:17 UTC (rev 274748)
@@ -1,3 +1,14 @@
+2021-03-19 Chris Dumez <[email protected]>
+
+ Resync webaudio web-platform-tests from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=223537
+
+ Reviewed by Alex Christensen.
+
+ Skip test that is crashing (will investigate in a follow-up).
+
+ * TestExpectations:
+
2021-03-19 Chris Gambrell <[email protected]>
[LayoutTests] Convert http/tests/gzip-content-encoding convert PHP to Python
Modified: trunk/LayoutTests/TestExpectations (274747 => 274748)
--- trunk/LayoutTests/TestExpectations 2021-03-19 23:36:22 UTC (rev 274747)
+++ trunk/LayoutTests/TestExpectations 2021-03-19 23:41:17 UTC (rev 274748)
@@ -346,6 +346,12 @@
# Skip WPT webaudio tests that are timing out.
imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediastreamaudiosourcenode-interface/mediastreamaudiosourcenode-routing.html [ Skip ]
+# Test has been crashing since its import.
+webkit.org/b/223538 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-param-getter-overridden.https.html [ Skip ]
+
+# Test has been failing and flaky since its import.
+imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/nan-param.html [ Failure Pass ]
+
# This test is timing out due to lack of support for SharedArrayBuffer.
imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-postmessage-sharedarraybuffer.https.html [ Skip ]
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (274747 => 274748)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-03-19 23:36:22 UTC (rev 274747)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-03-19 23:41:17 UTC (rev 274748)
@@ -1,3 +1,29 @@
+2021-03-19 Chris Dumez <[email protected]>
+
+ Resync webaudio web-platform-tests from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=223537
+
+ Reviewed by Alex Christensen.
+
+ esync webaudio web-platform-tests from upstream a8cbe9c712ad032d36.
+
+ * web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-duration-loop-expected.txt: Added.
+ * web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-duration-loop.html: Added.
+ * web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/w3c-import.log:
+ * web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/nan-param-expected.txt: Added.
+ * web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/nan-param.html: Added.
+ * web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/w3c-import.log:
+ * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-param-getter-overridden.https.html: Added.
+ * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/invalid-param-array-processor.js: Added.
+ (InvalidParamArrayProcessor.get parameterDescriptors):
+ (InvalidParamArrayProcessor):
+ (InvalidParamArrayProcessor.prototype.process):
+ (string_appeared_here):
+ * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/w3c-import.log:
+ * web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/w3c-import.log:
+ * web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator-expected.txt:
+ * web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html:
+
2021-03-19 Zalan Bujtas <[email protected]>
Unreviewed, reverting r274596.
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-duration-loop-expected.txt (0 => 274748)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-duration-loop-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-duration-loop-expected.txt 2021-03-19 23:41:17 UTC (rev 274748)
@@ -0,0 +1,8 @@
+
+PASS # AUDIT TASK RUNNER STARTED.
+PASS Executing "loop with duration"
+PASS Audit report
+PASS > [loop with duration]
+PASS < [loop with duration] All assertions passed. (total 0 assertions)
+PASS # AUDIT TASK RUNNER FINISHED: 1 tasks ran successfully.
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-duration-loop.html (0 => 274748)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-duration-loop.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-duration-loop.html 2021-03-19 23:41:17 UTC (rev 274748)
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>
+ Test AudioBufferSourceNode With Looping And Duration
+ </title>
+ <script src=""
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script id="layout-test-code">
+ let audit = Audit.createTaskRunner();
+ audit.define('loop with duration', (task, should) => {
+ // Create the context
+ let context = new OfflineAudioContext(1, 4096, 48000);
+
+ // Create the sample buffer and fill the second half with 1
+ let buffer = context.createBuffer(1, 2048, context.sampleRate);
+ for(let i = 1024; i < 2048; i++) {
+ buffer.getChannelData(0)[i] = 1;
+ }
+
+ // Create the source and set its value
+ let source = context.createBufferSource();
+ source.loop = true;
+ source.loopStart = 1024 / context.sampleRate;
+ source.loopEnd = 2048 / context.sampleRate;
+ source.buffer = buffer;
+ source.connect(context.destination);
+ source.start(0, 1024 / context.sampleRate, 2048 / context.sampleRate);
+ // Expectations
+ let expected = new Float32Array(4096);
+ for(let i = 0; i < 2048; i++) {
+ expected[i] = 1;
+ }
+ // Render it!
+ context.startRendering()
+ .then(function(audioBuffer) {
+ should(audioBuffer.getChannelData, "audioBuffer.getChannelData").beEqualToArray(expected);
+ })
+ .then(task.done());
+ });
+
+ audit.run();
+
+ </script>
+ </body>
+</html>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/w3c-import.log (274747 => 274748)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/w3c-import.log 2021-03-19 23:36:22 UTC (rev 274747)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/w3c-import.log 2021-03-19 23:41:17 UTC (rev 274748)
@@ -17,6 +17,7 @@
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/active-processing.https.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-basic.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-channels.html
+/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-duration-loop.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-ended.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-grain.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/nan-param-expected.txt (0 => 274748)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/nan-param-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/nan-param-expected.txt 2021-03-19 23:41:17 UTC (rev 274748)
@@ -0,0 +1,16 @@
+
+PASS # AUDIT TASK RUNNER STARTED.
+PASS Executing "AudioParam NaN"
+PASS Audit report
+PASS > [AudioParam NaN]
+PASS AudioParam input contains only NaN is true.
+FAIL X AudioParam output: Expected 100 for all values but found 256 unexpected values:
+ Index Actual
+ [0] -3.402823e+38
+ [1] -3.402823e+38
+ [2] -3.402823e+38
+ [3] -3.402823e+38
+ ...and 252 more errors. assert_true: expected true got false
+FAIL < [AudioParam NaN] 1 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-audioparam-interface/nan-param.html (0 => 274748)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/nan-param.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/nan-param.html 2021-03-19 23:41:17 UTC (rev 274748)
@@ -0,0 +1,92 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Test Flushing of NaN to Zero in AudioParams</title>
+ <script src=""
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+
+ <body>
+ <script>
+ let audit = Audit.createTaskRunner();
+
+ // See
+ // https://webaudio.github.io/web-audio-api/#computation-of-value.
+ //
+ // The computed value must replace NaN values in the output with
+ // the default value of the param.
+ audit.define('AudioParam NaN', async (task, should) => {
+ // For testing, we only need a small number of frames; and
+ // a low sample rate is perfectly fine. Use two channels.
+ // The first channel is for the AudioParam output. The
+ // second channel is for the AudioParam input.
+ let context = new OfflineAudioContext(
+ {numberOfChannels: 2, length: 256, sampleRate: 8192});
+ let merger = new ChannelMergerNode(
+ context, {numberOfInputs: context.destination.channelCount});
+ merger.connect(context.destination);
+
+ // A constant source with a huge value.
+ let mod = new ConstantSourceNode(context, {offset: 1e30});
+
+ // Gain nodes with a huge positive gain and huge negative
+ // gain. Combined with the huge offset in |mod|, the
+ // output of the gain nodes are +Infinity and -Infinity.
+ let gainPos = new GainNode(context, {gain: 1e30});
+ let gainNeg = new GainNode(context, {gain: -1e30});
+
+ mod.connect(gainPos);
+ mod.connect(gainNeg);
+
+ // Connect these to the second merger channel. This is a
+ // sanity check that the AudioParam input really is NaN.
+ gainPos.connect(merger, 0, 1);
+ gainNeg.connect(merger, 0, 1);
+
+ // Source whose AudioParam is connected to the graph
+ // that produces NaN values. Use a non-default value offset
+ // just in case something is wrong we get default for some
+ // other reason.
+ let src = "" ConstantSourceNode(context, {offset: 100});
+
+ gainPos.connect(src.offset);
+ gainNeg.connect(src.offset);
+
+ // AudioParam output goes to channel 1 of the destination.
+ src.connect(merger, 0, 0);
+
+ // Let's go!
+ mod.start();
+ src.start();
+
+ let buffer = await context.startRendering();
+
+ let input = buffer.getChannelData(1);
+ let output = buffer.getChannelData(0);
+
+ // Have to test manually for NaN values in the input because
+ // NaN fails all comparisons.
+ let isNaN = true;
+ for (let k = 0; k < input.length; ++k) {
+ if (!Number.isNaN(input[k])) {
+ isNaN = false;
+ break;
+ }
+ }
+
+ should(isNaN, 'AudioParam input contains only NaN').beTrue();
+
+ // Output of the AudioParam should have all NaN values
+ // replaced by the default.
+ should(output, 'AudioParam output')
+ .beConstantValueOf(src.offset.defaultValue);
+
+ task.done();
+ });
+
+ audit.run();
+ </script>
+ </body>
+</html>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/w3c-import.log (274747 => 274748)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/w3c-import.log 2021-03-19 23:36:22 UTC (rev 274747)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/w3c-import.log 2021-03-19 23:41:17 UTC (rev 274748)
@@ -47,6 +47,7 @@
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner-connections.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-stereo-panner.html
+/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/nan-param.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/retrospective-exponentialRampToValueAtTime.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/retrospective-linearRampToValueAtTime.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/retrospective-setTargetAtTime.html
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-param-getter-overridden.https.html (0 => 274748)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-param-getter-overridden.https.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-param-getter-overridden.https.html 2021-03-19 23:41:17 UTC (rev 274748)
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>
+ Test if AudioWorkletProcessor with invalid parameters array getter
+ </title>
+ <script src=""
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <script id="layout-test-code">
+ let audit = Audit.createTaskRunner();
+
+ // Arbitrarily determined. Any numbers should work.
+ let sampleRate = 16000;
+ let renderLength = 1280;
+ let context;
+ let filePath = 'processors/invalid-param-array-processor.js';
+
+ audit.define('Initializing AudioWorklet and Context', async (task) => {
+ context = new OfflineAudioContext(1, renderLength, sampleRate);
+ await context.audioWorklet.addModule(filePath);
+ task.done();
+ });
+
+ audit.define('Verifying AudioParam in AudioWorkletNode',
+ async (task, should) => {
+ let buffer = context.createBuffer(1, 2, context.sampleRate);
+ buffer.getChannelData(0)[0] = 1;
+
+ let source = new AudioBufferSourceNode(context);
+ source.buffer = buffer;
+ source.loop = true;
+ source.start();
+
+ let workletNode1 =
+ new AudioWorkletNode(context, 'invalid-param-array-1');
+ let workletNode2 =
+ new AudioWorkletNode(context, 'invalid-param-array-2');
+ workletNode1.connect(workletNode2).connect(context.destination);
+
+ // Manually invoke the param getter.
+ source.connect(workletNode2.parameters.get('invalidParam'));
+
+ const renderedBuffer = await context.startRendering();
+
+ // |workletNode2| should be no-op after the parameter getter is
+ // invoked. Therefore, the rendered result should be silent.
+ should(renderedBuffer.getChannelData(0), 'The rendered buffer')
+ .beConstantValueOf(0);
+ task.done();
+ }
+ );
+
+ audit.run();
+ </script>
+ </body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/invalid-param-array-processor.js (0 => 274748)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/invalid-param-array-processor.js (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/invalid-param-array-processor.js 2021-03-19 23:41:17 UTC (rev 274748)
@@ -0,0 +1,47 @@
+/**
+ * @class InvalidParamArrayProcessor
+ * @extends AudioWorkletProcessor
+ *
+ * This processor intentionally returns an array with an invalid size when the
+ * processor's getter is queried.
+ */
+let singleton = undefined;
+let secondFetch = false;
+let useDescriptor = false;
+let processCounter = 0;
+
+class InvalidParamArrayProcessor extends AudioWorkletProcessor {
+ static get parameterDescriptors() {
+ if (useDescriptor)
+ return [{name: 'invalidParam'}];
+ useDescriptor = true;
+ return [];
+ }
+
+ constructor() {
+ super();
+ if (singleton === undefined)
+ singleton = this;
+ return singleton;
+ }
+
+ process(inputs, outputs, parameters) {
+ const output = outputs[0];
+ for (let channel = 0; channel < output.length; ++channel)
+ output[channel].fill(1);
+ return false;
+ }
+}
+
+// This overridden getter is invoked under the hood before process() gets
+// called. After this gets called, process() method above will be invalidated,
+// and mark the worklet node non-functional. (i.e. in an error state)
+Object.defineProperty(Object.prototype, 'invalidParam', {'get': () => {
+ if (secondFetch)
+ return new Float32Array(256);
+ secondFetch = true;
+ return new Float32Array(128);
+}});
+
+registerProcessor('invalid-param-array-1', InvalidParamArrayProcessor);
+registerProcessor('invalid-param-array-2', InvalidParamArrayProcessor);
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/w3c-import.log (274747 => 274748)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/w3c-import.log 2021-03-19 23:36:22 UTC (rev 274747)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/w3c-import.log 2021-03-19 23:41:17 UTC (rev 274748)
@@ -27,6 +27,7 @@
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/gain-processor.js
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/input-count-processor.js
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/input-length-processor.js
+/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/invalid-param-array-processor.js
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/one-pole-processor.js
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/option-test-processor.js
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/param-size-processor.js
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/w3c-import.log (274747 => 274748)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/w3c-import.log 2021-03-19 23:36:22 UTC (rev 274747)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/w3c-import.log 2021-03-19 23:41:17 UTC (rev 274748)
@@ -32,6 +32,7 @@
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-output-channel-count.https.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-options.https.html
+/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-param-getter-overridden.https.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-process-frozen-array.https.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-process-zero-outputs.https.html
/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-promises.https.html
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator-expected.txt (274747 => 274748)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator-expected.txt 2021-03-19 23:36:22 UTC (rev 274747)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator-expected.txt 2021-03-19 23:41:17 UTC (rev 274748)
@@ -57,7 +57,8 @@
PASS node1.channelInterpretation is equal to speakers.
PASS new OscillatorNode(c, {"type":"sine","periodicWave":{}}) did not throw an exception.
PASS new OscillatorNode(c, {"type":"custom"}) threw InvalidStateError: "Must provide periodicWave when using custom type.".
-PASS new OscillatorNode(, {"type":"custom","periodicWave":{}}) did not throw an exception.
-PASS < [constructor options] All assertions passed. (total 10 assertions)
+PASS new OscillatorNode(c, {"type":"custom","periodicWave":{}}) did not throw an exception.
+PASS new OscillatorNode(c, {periodicWave: null} threw TypeError: "Type error".
+PASS < [constructor options] All assertions passed. (total 11 assertions)
PASS # AUDIT TASK RUNNER FINISHED: 5 tasks ran successfully.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html (274747 => 274748)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html 2021-03-19 23:36:22 UTC (rev 274747)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html 2021-03-19 23:41:17 UTC (rev 274748)
@@ -95,8 +95,14 @@
};
should(() => {
node = new OscillatorNode(context, options);
- }, 'new OscillatorNode(, ' + JSON.stringify(options) + ')').notThrow();
+ }, 'new OscillatorNode(c, ' + JSON.stringify(options) + ')').notThrow();
+ should(
+ () => {
+ node = new OscillatorNode(context, {periodicWave: null});
+ },
+ 'new OscillatorNode(c, {periodicWave: null}')
+ .throw(DOMException, 'TypeError');
task.done();
});