Index: third_party/WebKit/LayoutTests/webaudio/constructor/new-audionodeoptions.js |
diff --git a/third_party/WebKit/LayoutTests/webaudio/constructor/new-audionodeoptions.js b/third_party/WebKit/LayoutTests/webaudio/constructor/new-audionodeoptions.js |
index fd999e400f5e62dba7ee6df1bec41461ce334873..1db057cbef91dc41363673123e16349e01ae24ea 100644 |
--- a/third_party/WebKit/LayoutTests/webaudio/constructor/new-audionodeoptions.js |
+++ b/third_party/WebKit/LayoutTests/webaudio/constructor/new-audionodeoptions.js |
@@ -190,12 +190,17 @@ function testInvalidConstructor(should, name, context) { |
function testDefaultConstructor(should, name, context, options) { |
let node; |
+ let message = options.prefix + ' = new ' + name + '(context'; |
+ if (options.constructorOptions) |
+ message += ', ' + JSON.stringify(options.constructorOptions); |
+ message += ')' |
+ |
should(() => { |
- node = new window[name](context); |
- }, options.prefix + ' = new ' + name + '(context)').notThrow(); |
+ node = new window[name](context, options.constructorOptions); |
+ }, message).notThrow(); |
+ |
should(node instanceof window[name], options.prefix + ' instanceof ' + name) |
.beEqualTo(true); |
- |
should(node.numberOfInputs, options.prefix + '.numberOfInputs') |
.beEqualTo(options.numberOfInputs); |
should(node.numberOfOutputs, options.prefix + '.numberOfOutputs') |