| 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 11 matching lines...) Expand all Loading... |
| 22 should(3 < 5, '3 < 5').beTrue(); | 22 should(3 < 5, '3 < 5').beTrue(); |
| 23 should(false).beFalse(); | 23 should(false).beFalse(); |
| 24 should(1).beEqualTo(1) | 24 should(1).beEqualTo(1) |
| 25 should(1).notBeEqualTo(2) | 25 should(1).notBeEqualTo(2) |
| 26 should(typeof AudioContext.prototype).beEqualTo('object'); | 26 should(typeof AudioContext.prototype).beEqualTo('object'); |
| 27 should(2).beGreaterThan(1); | 27 should(2).beGreaterThan(1); |
| 28 should(2).beGreaterThanOrEqualTo(2); | 28 should(2).beGreaterThanOrEqualTo(2); |
| 29 should(1).beLessThan(2); | 29 should(1).beLessThan(2); |
| 30 should(1).beLessThanOrEqualTo(1); | 30 should(1).beLessThanOrEqualTo(1); |
| 31 should(should(1).beEqualTo(1), 'should(1).beEqualTo(1)').beTrue(); | 31 should(should(1).beEqualTo(1), 'should(1).beEqualTo(1)').beTrue(); |
| 32 should(true, 'The message is').message('truthful!', 'false!'); |
| 32 | 33 |
| 33 let oac = new OfflineAudioContext(1, 128, 44100); | 34 let oac = new OfflineAudioContext(1, 128, 44100); |
| 34 Promise.all([ | 35 Promise.all([ |
| 35 should(oac.startRendering(), 'Start OAC rendering').beResolved(), | 36 should(oac.startRendering(), 'Start OAC rendering').beResolved(), |
| 36 should(oac.decodeAudioData(), 'Decoding audio data with no argument') | 37 should(oac.decodeAudioData(), 'Decoding audio data with no argument') |
| 37 .beRejected(), | 38 .beRejected(), |
| 38 should(oac.suspend(), 'Suspending OAC with no argument') | 39 should(oac.suspend(), 'Suspending OAC with no argument') |
| 39 .beRejectedWith('TypeError') | 40 .beRejectedWith('TypeError') |
| 40 ]).then(task.done.bind(task)); | 41 ]).then(task.done.bind(task)); |
| 41 }); | 42 }); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 69 task.done(); | 70 task.done(); |
| 70 }); | 71 }); |
| 71 | 72 |
| 72 | 73 |
| 73 // You can enumerate tasks you want to execute in the order, or simply pass | 74 // You can enumerate tasks you want to execute in the order, or simply pass |
| 74 // no argument to run all the defined tasks. | 75 // no argument to run all the defined tasks. |
| 75 audit.run('numerical', 'basic'); | 76 audit.run('numerical', 'basic'); |
| 76 </script> | 77 </script> |
| 77 </body> | 78 </body> |
| 78 </html> | 79 </html> |
| OLD | NEW |