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

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

Issue 2805773002: Implement ownProperty() and inheritFrom() assertions in should() (Closed)
Patch Set: Addressing feedback 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/resources/audit.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Test AudioScheduledSourceNode</title> 4 <title>Test AudioScheduledSourceNode</title>
5 <script src="../resources/testharness.js"></script> 5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script> 6 <script src="../resources/testharnessreport.js"></script>
7 <script src="resources/audit.js"></script> 7 <script src="resources/audit.js"></script>
8 </head> 8 </head>
9 9
10 <body> 10 <body>
(...skipping 18 matching lines...) Expand all
29 audit.define( 29 audit.define(
30 { 30 {
31 label: 'properties', 31 label: 'properties',
32 description: 'Test properties on derived nodes' 32 description: 'Test properties on derived nodes'
33 }, 33 },
34 function(task, should) { 34 function(task, should) {
35 var expectedProperties = ['start', 'stop', 'onended']; 35 var expectedProperties = ['start', 'stop', 'onended'];
36 36
37 // AudioScheduledSourceNode must have these properties. 37 // AudioScheduledSourceNode must have these properties.
38 for (p in expectedProperties) { 38 for (p in expectedProperties) {
39 should( 39 should(AudioScheduledSourceNode.prototype,
40 AudioScheduledSourceNode.prototype.hasOwnProperty( 40 'AudioScheduledSourceNode.prototype')
41 expectedProperties[p]), 41 .haveOwnProperty(expectedProperties[p]);
42 'AudioScheduledSourceNode.' + expectedProperties[p])
43 .beTrue();
44 } 42 }
45 43
46 // ConstantSource and Oscillator must not 44 // ConstantSource and Oscillator must not
47 var nodes = ['ConstantSourceNode', 'OscillatorNode']; 45 var nodes = ['ConstantSourceNode', 'OscillatorNode'];
48 for (n in nodes) { 46 for (n in nodes) {
49 for (p in expectedProperties) { 47 for (p in expectedProperties) {
50 should( 48 should(window[nodes[n]].prototype, nodes[n] + '.prototype')
51 window[nodes[n]].prototype.hasOwnProperty( 49 .notHaveOwnProperty(expectedProperties[p]);
52 expectedProperties[p]),
53 nodes[n] + '.' + expectedProperties[p])
54 .beFalse();
55 } 50 }
56 } 51 }
57 52
58 // AudioBufferSourceNode has it's own start method, but should not 53 // AudioBufferSourceNode has it's own start method, but should not
59 // have the others. 54 // have the others.
60 for (p in expectedProperties) { 55 for (p in expectedProperties) {
61 if (expectedProperties[p] !== 'start') { 56 if (expectedProperties[p] !== 'start') {
62 should( 57 should(AudioBufferSourceNode.prototype,
63 AudioBufferSourceNode.prototype.hasOwnProperty( 58 'AudioBufferSourceNode.prototype')
64 expectedProperties[p]), 59 .notHaveOwnProperty(expectedProperties[p]);
65 'AudioBufferSourceNode.' + expectedProperties[p])
66 .beFalse();
67 } 60 }
68 } 61 }
69 62
70 should( 63 should(AudioBufferSourceNode.prototype,
71 AudioBufferSourceNode.prototype.hasOwnProperty('start'), 64 'AudioBufferSourceNode.prototype')
72 'AudioBufferSourceNode.start') 65 .haveOwnProperty('start');
73 .beTrue();
74 66
75 task.done(); 67 task.done();
76 }); 68 });
77 69
78 audit.run(); 70 audit.run();
79 </script> 71 </script>
80 </body> 72 </body>
81 </html> 73 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/resources/audit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698