Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/webaudio/audio-scheduled-source-basic.html |
| diff --git a/third_party/WebKit/LayoutTests/webaudio/audio-scheduled-source-basic.html b/third_party/WebKit/LayoutTests/webaudio/audio-scheduled-source-basic.html |
| index d67350dbed186be512c7cd442a3fbbc01b8bd030..f01d7b41b72f4dd6231e5c1b96469dd51ce2b5e6 100644 |
| --- a/third_party/WebKit/LayoutTests/webaudio/audio-scheduled-source-basic.html |
| +++ b/third_party/WebKit/LayoutTests/webaudio/audio-scheduled-source-basic.html |
| @@ -36,22 +36,17 @@ |
| // AudioScheduledSourceNode must have these properties. |
| for (p in expectedProperties) { |
| - should( |
| - AudioScheduledSourceNode.prototype.hasOwnProperty( |
| - expectedProperties[p]), |
| - 'AudioScheduledSourceNode.' + expectedProperties[p]) |
| - .beTrue(); |
| + should(AudioScheduledSourceNode.prototype, |
|
Raymond Toy
2017/04/07 16:10:58
It's nicer if it were
should(AudioScheduledSource
hongchan
2017/04/07 17:22:17
What if we want to check an object not the prototy
|
| + 'AudioScheduledSourceNode.prototype') |
| + .ownProperty(expectedProperties[p]); |
| } |
| // ConstantSource and Oscillator must not |
| var nodes = ['ConstantSourceNode', 'OscillatorNode']; |
| for (n in nodes) { |
| for (p in expectedProperties) { |
| - should( |
| - window[nodes[n]].prototype.hasOwnProperty( |
| - expectedProperties[p]), |
| - nodes[n] + '.' + expectedProperties[p]) |
| - .beFalse(); |
| + should(window[nodes[n]].prototype, nodes[n] + '.prototype') |
| + .notOwnProperty(expectedProperties[p]); |
| } |
| } |
| @@ -59,18 +54,15 @@ |
| // have the others. |
| for (p in expectedProperties) { |
| if (expectedProperties[p] !== 'start') { |
| - should( |
| - AudioBufferSourceNode.prototype.hasOwnProperty( |
| - expectedProperties[p]), |
| - 'AudioBufferSourceNode.' + expectedProperties[p]) |
| - .beFalse(); |
| + should(AudioBufferSourceNode.prototype, |
| + 'AudioBufferSourceNode.prototype') |
| + .notOwnProperty(expectedProperties[p]); |
| } |
| } |
| - should( |
| - AudioBufferSourceNode.prototype.hasOwnProperty('start'), |
| - 'AudioBufferSourceNode.start') |
| - .beTrue(); |
| + should(AudioBufferSourceNode.prototype, |
| + 'AudioBufferSourceNode.prototype') |
| + .ownProperty('start'); |
| task.done(); |
| }); |