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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-ended.html

Issue 2895963003: Apply layout-test-tidy to LayoutTests/webaudio (Closed)
Patch Set: Created 3 years, 7 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 <head> 2 <html>
3 <head>
4 <title>
5 audiobuffersource-ended.html
6 </title>
3 <script src="../../resources/testharness.js"></script> 7 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 8 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../resources/audit-util.js"></script> 9 <script src="../resources/audit-util.js"></script>
6 <script src="../resources/audit.js"></script> 10 <script src="../resources/audit.js"></script>
7 <script src="../resources/audiobuffersource-testing.js"></script> 11 <script src="../resources/audiobuffersource-testing.js"></script>
8 </head> 12 </head>
9 <body> 13 <body>
10 <script> 14 <script id="layout-test-code">
11 let audit = Audit.createTaskRunner(); 15 let audit = Audit.createTaskRunner();
12 16
13 let context; 17 let context;
14 let source; 18 let source;
15 19
16 audit.define("AudioBufferSourceNode calls its onended EventListener", 20 audit.define(
17 function (task, should) { 21 'AudioBufferSourceNode calls its onended EventListener',
18 let sampleRate = 44100.0; 22 function(task, should) {
19 let numberOfFrames = 32; 23 let sampleRate = 44100.0;
20 context = new OfflineAudioContext(1, numberOfFrames, sampleRate); 24 let numberOfFrames = 32;
21 source = context.createBufferSource(); 25 context = new OfflineAudioContext(1, numberOfFrames, sampleRate);
22 source.buffer = createTestBuffer(context, numberOfFrames); 26 source = context.createBufferSource();
23 source.connect(context.destination); 27 source.buffer = createTestBuffer(context, numberOfFrames);
24 source.onended = function () { 28 source.connect(context.destination);
25 should(true, "source.onended called").beTrue(); 29 source.onended = function() {
26 task.done(); 30 should(true, 'source.onended called').beTrue();
27 }; 31 task.done();
28 source.start(0); 32 };
29 context.startRendering(); 33 source.start(0);
30 }); 34 context.startRendering();
35 });
31 36
32 audit.run(); 37 audit.run();
33 </script> 38 </script>
34 </body> 39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698