| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>audit.js: handling failures</title> | 4 <title>audit.js: handling failures</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 17 matching lines...) Expand all Loading... |
| 28 should(3 > 5, '3 < 5').beTrue(); | 28 should(3 > 5, '3 < 5').beTrue(); |
| 29 should(true).beFalse(); | 29 should(true).beFalse(); |
| 30 should(1, 'The number of channels').beEqualTo(2); | 30 should(1, 'The number of channels').beEqualTo(2); |
| 31 should(1).notBeEqualTo(1); | 31 should(1).notBeEqualTo(1); |
| 32 should(typeof 3.141592, 'typeof 3.141592').beEqualTo('string'); | 32 should(typeof 3.141592, 'typeof 3.141592').beEqualTo('string'); |
| 33 should(1).beGreaterThan(2); | 33 should(1).beGreaterThan(2); |
| 34 should(1).beGreaterThanOrEqualTo(2); | 34 should(1).beGreaterThanOrEqualTo(2); |
| 35 should(2).beLessThan(1); | 35 should(2).beLessThan(1); |
| 36 should(2).beLessThanOrEqualTo(1); | 36 should(2).beLessThanOrEqualTo(1); |
| 37 should(should(1).beEqualTo(2), 'should(1).beEqualTo(2)').beTrue(); | 37 should(should(1).beEqualTo(2), 'should(1).beEqualTo(2)').beTrue(); |
| 38 should(false, 'The message is').message('truthful!', 'false!'); |
| 38 | 39 |
| 39 let oac = new OfflineAudioContext(1, 128, 44100); | 40 let oac = new OfflineAudioContext(1, 128, 44100); |
| 40 Promise.all([ | 41 Promise.all([ |
| 41 should(oac.decodeAudioData(), 'Decoding audio data with no argument') | 42 should(oac.decodeAudioData(), 'Decoding audio data with no argument') |
| 42 .beResolved(), | 43 .beResolved(), |
| 43 should(oac.startRendering(), 'Start OAC rendering').beRejected(), | 44 should(oac.startRendering(), 'Start OAC rendering').beRejected(), |
| 44 should(oac.suspend(), 'Suspending OAC with no argument') | 45 should(oac.suspend(), 'Suspending OAC with no argument') |
| 45 .beRejectedWith('IndexSizeError') | 46 .beRejectedWith('IndexSizeError') |
| 46 ]).then(task.done.bind(task)); | 47 ]).then(task.done.bind(task)); |
| 47 }); | 48 }); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 75 | 76 |
| 76 task.done(); | 77 task.done(); |
| 77 }); | 78 }); |
| 78 | 79 |
| 79 | 80 |
| 80 // With no argument, this executes all tasks in the order defined. | 81 // With no argument, this executes all tasks in the order defined. |
| 81 audit.run(); | 82 audit.run(); |
| 82 </script> | 83 </script> |
| 83 </body> | 84 </body> |
| 84 </html> | 85 </html> |
| OLD | NEW |