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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/onstatechange.html

Issue 2708953003: Move task.describe descriptions to audit.define (Closed)
Patch Set: Address review comments. Created 3 years, 10 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>Test statechange event</title> 4 <title>Test statechange event</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-util.js"/></script> 7 <script src="../resources/audit-util.js"/></script>
8 <script src="../resources/audit.js"/></script> 8 <script src="../resources/audit.js"/></script>
9 </head> 9 </head>
10 10
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 function finalCheck(should) { 40 function finalCheck(should) {
41 // Final check that we got the right number of state changes and the cor rect final state. 41 // Final check that we got the right number of state changes and the cor rect final state.
42 should(stateChangeCount, "stateChangeCount") 42 should(stateChangeCount, "stateChangeCount")
43 .beEqualTo(2); 43 .beEqualTo(2);
44 should(context.state, "context.state") 44 should(context.state, "context.state")
45 .beEqualTo("closed"); 45 .beEqualTo("closed");
46 } 46 }
47 47
48 audit.define('test', (task, should) => { 48 audit.define({
49 task.describe('Signaling of statechange event'); 49 label: 'test',
50 description: 'Signaling of statechange event'
51 }, (task, should) => {
50 // Create an offline context with a source passing through a convolver. The convolver is 52 // Create an offline context with a source passing through a convolver. The convolver is
51 // just to waste some time. 53 // just to waste some time.
52 context = new OfflineAudioContext(1, secondsToRender * sampleRate, sampl eRate); 54 context = new OfflineAudioContext(1, secondsToRender * sampleRate, sampl eRate);
53 var buffer = createImpulseBuffer(context, sampleRate); 55 var buffer = createImpulseBuffer(context, sampleRate);
54 var source = context.createBufferSource(); 56 var source = context.createBufferSource();
55 var conv = context.createConvolver(); 57 var conv = context.createConvolver();
56 58
57 source.buffer = buffer; 59 source.buffer = buffer;
58 conv.normalize = false; 60 conv.normalize = false;
59 conv.buffer = buffer; 61 conv.buffer = buffer;
(...skipping 15 matching lines...) Expand all
75 setTimeout(() => { 77 setTimeout(() => {
76 finalCheck(should); 78 finalCheck(should);
77 task.done(); 79 task.done();
78 }, secondsToRender * 1000); 80 }, secondsToRender * 1000);
79 }); 81 });
80 82
81 audit.run(); 83 audit.run();
82 </script> 84 </script>
83 </body> 85 </body>
84 </html> 86 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698