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

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

Issue 2892803002: Fix layout tests to prevent errors from layout-test-tidy (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 <head>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../resources/audit-util.js"></script> 5 <script src="../resources/audit-util.js"></script>
6 <script src="../resources/audit.js"></script> 6 <script src="../resources/audit.js"></script>
7 <script src="../resources/audiobuffersource-testing.js"></script> 7 <script src="../resources/audiobuffersource-testing.js"></script>
8 </head> 8 </head>
9 <body> 9 <body>
10 <script> 10 <script>
11 let audit = Audit.createTaskRunner(); 11 let audit = Audit.createTaskRunner();
12 12
13 let context; 13 let context;
14 let source; 14 let source;
15 15
16 audit.define("AudioBufferSourceNode calls its onended EventListener", 16 audit.define("AudioBufferSourceNode calls its onended EventListener",
17 function (task, should) { 17 function (task, should) {
18 let sampleRate = 44100.0; 18 let sampleRate = 44100.0;
19 let numberOfFrames = 32; 19 let numberOfFrames = 32;
20 context = new OfflineAudioContext(1, numberOfFrames, sampleRate); 20 context = new OfflineAudioContext(1, numberOfFrames, sampleRate);
21 source = context.createBufferSource(); 21 source = context.createBufferSource();
22 source.buffer = createTestBuffer(context, numberOfFrames); 22 source.buffer = createTestBuffer(context, numberOfFrames);
23 source.connect(context.destination); 23 source.connect(context.destination);
24 source.onended = function () { 24 source.onended = function () {
25 should(true, "source.onended called").beTrue(); 25 should(true, "source.onended called").beTrue();
26 task.done(); 26 task.done();
27 } 27 };
Raymond Toy 2017/05/19 13:53:38 clang-format complains about the missing semicolon
hongchan 2017/05/19 16:15:29 According to chromium/google JS style, it is not a
28 source.start(0); 28 source.start(0);
29 context.startRendering(); 29 context.startRendering();
30 }); 30 });
31 31
32 audit.run(); 32 audit.run();
33 </script> 33 </script>
34 </body> 34 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698