| 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 10 matching lines...) Expand all Loading... |
| 21 should(function () { var foo3 = bar; }).throw('ReferenceError'); | 21 should(function () { var foo3 = bar; }).throw('ReferenceError'); |
| 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 | 32 |
| 32 let oac = new OfflineAudioContext(1, 128, 44100); | 33 let oac = new OfflineAudioContext(1, 128, 44100); |
| 33 Promise.all([ | 34 Promise.all([ |
| 34 should(oac.startRendering(), 'Start OAC rendering').beResolved(), | 35 should(oac.startRendering(), 'Start OAC rendering').beResolved(), |
| 35 should(oac.decodeAudioData(), 'Decoding audio data with no argument') | 36 should(oac.decodeAudioData(), 'Decoding audio data with no argument') |
| 36 .beRejected(), | 37 .beRejected(), |
| 37 should(oac.suspend(), 'Suspending OAC with no argument') | 38 should(oac.suspend(), 'Suspending OAC with no argument') |
| 38 .beRejectedWith('TypeError') | 39 .beRejectedWith('TypeError') |
| 39 ]).then(task.done.bind(task)); | 40 ]).then(task.done.bind(task)); |
| 40 }); | 41 }); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 68 task.done(); | 69 task.done(); |
| 69 }); | 70 }); |
| 70 | 71 |
| 71 | 72 |
| 72 // You can enumerate tasks you want to execute in the order, or simply pass | 73 // You can enumerate tasks you want to execute in the order, or simply pass |
| 73 // no argument to run all the defined tasks. | 74 // no argument to run all the defined tasks. |
| 74 audit.run('numerical', 'basic'); | 75 audit.run('numerical', 'basic'); |
| 75 </script> | 76 </script> |
| 76 </body> | 77 </body> |
| 77 </html> | 78 </html> |
| OLD | NEW |