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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures.html

Issue 2655353003: Fix individual should() assertions to return result (Closed)
Patch Set: Initial Commit Created 3 years, 11 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: 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 16 matching lines...) Expand all
27 should(function () { var foo = 0; }).throw('ReferenceError'); 27 should(function () { var foo = 0; }).throw('ReferenceError');
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 38
38 let oac = new OfflineAudioContext(1, 128, 44100); 39 let oac = new OfflineAudioContext(1, 128, 44100);
39 Promise.all([ 40 Promise.all([
40 should(oac.decodeAudioData(), 'Decoding audio data with no argument') 41 should(oac.decodeAudioData(), 'Decoding audio data with no argument')
41 .beResolved(), 42 .beResolved(),
42 should(oac.startRendering(), 'Start OAC rendering').beRejected(), 43 should(oac.startRendering(), 'Start OAC rendering').beRejected(),
43 should(oac.suspend(), 'Suspending OAC with no argument') 44 should(oac.suspend(), 'Suspending OAC with no argument')
44 .beRejectedWith('IndexSizeError') 45 .beRejectedWith('IndexSizeError')
45 ]).then(task.done.bind(task)); 46 ]).then(task.done.bind(task));
46 }); 47 });
(...skipping 27 matching lines...) Expand all
74 75
75 task.done(); 76 task.done();
76 }); 77 });
77 78
78 79
79 // With no argument, this executes all tasks in the order defined. 80 // With no argument, this executes all tasks in the order defined.
80 audit.run(); 81 audit.run();
81 </script> 82 </script>
82 </body> 83 </body>
83 </html> 84 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698