Bug 1421091 - Fix duplicate name error. r?karlt draft
authorPaul Adenot <paul@paul.cx>
Wed, 11 Jul 2018 14:22:46 +0200
changeset 817345 d86811b4cc58448df3fb36a55a206b9fdffff835
parent 817343 2bc1475054a74ae643ce0c3ba08a74340e1f5c67
push id116025
push userpaul@paul.cx
push dateThu, 12 Jul 2018 12:27:46 +0000
reviewerskarlt
bugs1421091
milestone63.0a1
Bug 1421091 - Fix duplicate name error. r?karlt This makes WPT error out, because the if no name is passed in, it's synthetized from the result, and the result is the same in those cases. It's unclear to me why it wasn't an error before, but it's erroring out now and the fix is simple. MozReview-Commit-ID: KHOiXoIAliG
testing/web-platform/tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html
--- a/testing/web-platform/tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html
+++ b/testing/web-platform/tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html
@@ -27,21 +27,25 @@
                 1, sampleRate * renderLengthSeconds, sampleRate);
             let toneBuffer = createToneBuffer(
                 context, 20, 20 * toneLengthSeconds, sampleRate);  // 20Hz tone
 
             let bufferSource = context.createBufferSource();
             bufferSource.buffer = toneBuffer;
 
             window.context = context;
-            should(() => context.createDelay(180)).throw();
-            should(() => context.createDelay(0)).throw();
-            should(() => context.createDelay(-1)).throw();
-            should(() => context.createDelay(NaN)).throw();
-            ;
+            should(() => context.createDelay(180)).throw("NotSupportedError",
+              "Delay length cannot be 180 seconds or more");
+            should(() => context.createDelay(0)).throw("NotSupportedError",
+              "Delay length cannot be 0");
+            should(() => context.createDelay(-1)).throw("NotSupportedError",
+              "Delay length cannot be negative");
+            should(() => context.createDelay(NaN)).throw(TypeError,
+              "Delay lenght cannot be a NaN");
+
             let delay = context.createDelay(179);
             delay.delayTime.value = delayTimeSeconds;
             window.delay = delay;
             should(
                 delay.delayTime.value,
                 'delay.delayTime.value = ' + delayTimeSeconds)
                 .beEqualTo(delayTimeSeconds);