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
--- 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);