OLD | NEW |
---|---|
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 Loading... | |
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 .ownProperty('createGain'); | |
41 | |
42 let ac = new AudioContext(); | |
43 let sourceNode = new AudioBufferSourceNode(ac); | |
44 should(sourceNode, 'A BufferSourceNode') | |
Raymond Toy
2017/04/06 23:13:14
There's no such thing as a BufferSourceNode, so us
hongchan
2017/04/07 15:55:36
Done.
| |
45 .inheritFrom('AudioScheduledSourceNode'); | |
46 should(sourceNode, 'A BufferSourceNode') | |
47 .inheritFrom('AudioNode'); | |
48 | |
39 let oac = new OfflineAudioContext(1, 128, 44100); | 49 let oac = new OfflineAudioContext(1, 128, 44100); |
40 Promise.all([ | 50 Promise.all([ |
41 should(oac.startRendering(), 'Start OAC rendering').beResolved(), | 51 should(oac.startRendering(), 'Start OAC rendering').beResolved(), |
42 should(oac.decodeAudioData(), 'Decoding audio data with no argument' ) | 52 should(oac.decodeAudioData(), 'Decoding audio data with no argument' ) |
43 .beRejected(), | 53 .beRejected(), |
44 should(oac.suspend(), 'Suspending OAC with no argument') | 54 should(oac.suspend(), 'Suspending OAC with no argument') |
45 .beRejectedWith('TypeError') | 55 .beRejectedWith('TypeError') |
46 ]).then(task.done.bind(task)); | 56 ]).then(task.done.bind(task)); |
47 } | 57 } |
48 ); | 58 ); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 }); | 124 }); |
115 | 125 |
116 | 126 |
117 // You can enumerate tasks you want to execute in the order, or simply pass | 127 // You can enumerate tasks you want to execute in the order, or simply pass |
118 // no argument to run all the defined tasks. | 128 // no argument to run all the defined tasks. |
119 audit.run('numerical', 'numerical typed arrays', 'basic', | 129 audit.run('numerical', 'numerical typed arrays', 'basic', |
120 'load-file-in-should', 'dummy-label-string', 'dummy-label-object') ; | 130 'load-file-in-should', 'dummy-label-string', 'dummy-label-object') ; |
121 </script> | 131 </script> |
122 </body> | 132 </body> |
123 </html> | 133 </html> |
OLD | NEW |