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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-loop-grain-no-duration.html

Issue 2593043003: Convert AudioBufferSource tests using Audit to testharness (Closed)
Patch Set: Missed a couple testFailed calls. 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 3
4 <head> 4 <head>
5 <title>Test AudioBufferSourceNode looping without explicit duration</title> 5 <title>Test AudioBufferSourceNode looping without explicit duration</title>
6 <script src="../../resources/js-test.js"></script> 6 <script src="../../resources/testharness.js"></script>
7 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../resources/audit-util.js"></script> 8 <script src="../resources/audit-util.js"></script>
8 <script src="../resources/audio-testing.js"></script> 9 <script src="../resources/audio-testing.js"></script>
9 </head> 10 </head>
10 11
11 <body> 12 <body>
12 <script> 13 <script>
13 description("Test AudioBufferSourceNode looping without explicit duration");
14 window.jsTestIsAsync = true;
15 14
16 // Reasonably low sample rate for the optimum test speed. 15 // Reasonably low sample rate for the optimum test speed.
17 var sampleRate = 4096; 16 var sampleRate = 4096;
18 17
19 var audit = Audit.createTaskRunner(); 18 var audit = Audit.createTaskRunner();
20 19
21 // Task: create a short linear ramp and enable looping. The test will 20 // Task: create a short linear ramp and enable looping. The test will
22 // verify that the ramp was looped the appropriate number of times. 21 // verify that the ramp was looped the appropriate number of times.
23 audit.defineTask('loop-count', function (done) { 22 audit.defineTask('loop-count', function (done) {
24 // How many loops of the source we want to render. Any whole number 23 // How many loops of the source we want to render. Any whole number
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 90
92 context.startRendering().then(function (buffer) { 91 context.startRendering().then(function (buffer) {
93 // The left and right channel must match regardless of the timing 92 // The left and right channel must match regardless of the timing
94 // of buffer assignment. 93 // of buffer assignment.
95 Should('The content of the left and right channel', 94 Should('The content of the left and right channel',
96 buffer.getChannelData(0)).beEqualToArray(buffer.getChannelData(1)); 95 buffer.getChannelData(0)).beEqualToArray(buffer.getChannelData(1));
97 }).then(done); 96 }).then(done);
98 }); 97 });
99 98
100 audit.defineTask('finish', function (done) { 99 audit.defineTask('finish', function (done) {
101 finishJSTest();
102 done(); 100 done();
103 }); 101 });
104 102
105 audit.runTasks( 103 audit.runTasks(
106 'loop-count', 104 'loop-count',
107 'delayed-start', 105 'delayed-start',
108 'finish' 106 'finish'
109 ); 107 );
110 108
111 successfullyParsed = true; 109 successfullyParsed = true;
112 </script> 110 </script>
113 </body> 111 </body>
114 112
115 </html> 113 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698