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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>audit.js: basic tests</title> 4 <title>audit.js: basic tests</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 <body> 9 <body>
10 <script> 10 <script>
(...skipping 18 matching lines...) Expand all
29 should(1).beEqualTo(1) 29 should(1).beEqualTo(1)
30 should(1).notBeEqualTo(2) 30 should(1).notBeEqualTo(2)
31 should(typeof AudioContext.prototype).beEqualTo('object'); 31 should(typeof AudioContext.prototype).beEqualTo('object');
32 should(2).beGreaterThan(1); 32 should(2).beGreaterThan(1);
33 should(2).beGreaterThanOrEqualTo(2); 33 should(2).beGreaterThanOrEqualTo(2);
34 should(1).beLessThan(2); 34 should(1).beLessThan(2);
35 should(1).beLessThanOrEqualTo(1); 35 should(1).beLessThanOrEqualTo(1);
36 should(should(1).beEqualTo(1), 'should(1).beEqualTo(1)').beTrue(); 36 should(should(1).beEqualTo(1), 'should(1).beEqualTo(1)').beTrue();
37 should(true, 'The message is').message('truthful!', 'false!'); 37 should(true, 'The message is').message('truthful!', 'false!');
38 38
39 should(BaseAudioContext.prototype, 'BaseAudioContext.prototype')
40 .haveOwnProperty('createGain');
41 should(BaseAudioContext.prototype, 'BaseAudioContext.prototype')
42 .notHaveOwnProperty('startRendering');
43
44 let ac = new AudioContext();
45 let sourceNode = new AudioBufferSourceNode(ac);
46 should(sourceNode, 'An AudioBufferSourceNode')
47 .inheritFrom('AudioScheduledSourceNode');
48 should(sourceNode, 'An AudioBufferSourceNode')
49 .inheritFrom('AudioNode');
50
39 let oac = new OfflineAudioContext(1, 128, 44100); 51 let oac = new OfflineAudioContext(1, 128, 44100);
40 Promise.all([ 52 Promise.all([
41 should(oac.startRendering(), 'Start OAC rendering').beResolved(), 53 should(oac.startRendering(), 'Start OAC rendering').beResolved(),
42 should(oac.decodeAudioData(), 'Decoding audio data with no argument' ) 54 should(oac.decodeAudioData(), 'Decoding audio data with no argument' )
43 .beRejected(), 55 .beRejected(),
44 should(oac.suspend(), 'Suspending OAC with no argument') 56 should(oac.suspend(), 'Suspending OAC with no argument')
45 .beRejectedWith('TypeError') 57 .beRejectedWith('TypeError')
46 ]).then(task.done.bind(task)); 58 ]).then(task.done.bind(task));
47 } 59 }
48 ); 60 );
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 }); 126 });
115 127
116 128
117 // You can enumerate tasks you want to execute in the order, or simply pass 129 // You can enumerate tasks you want to execute in the order, or simply pass
118 // no argument to run all the defined tasks. 130 // no argument to run all the defined tasks.
119 audit.run('numerical', 'numerical typed arrays', 'basic', 131 audit.run('numerical', 'numerical typed arrays', 'basic',
120 'load-file-in-should', 'dummy-label-string', 'dummy-label-object') ; 132 'load-file-in-should', 'dummy-label-string', 'dummy-label-object') ;
121 </script> 133 </script>
122 </body> 134 </body>
123 </html> 135 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698