Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: third_party/WebKit/LayoutTests/webaudio/audio-scheduled-source-basic.html

Issue 2805773002: Implement ownProperty() and inheritFrom() assertions in should() (Closed)
Patch Set: Add should().notOwnProperty() and fixed audio-scheduled-source-basic.html Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
});

Powered by Google App Engine
This is Rietveld 408576698