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

Side by Side Diff: LayoutTests/webaudio/audionode-channel-rules.html

Issue 208943004: Update WebAudio layout tests to use unprefixed AudioContext. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add console.log to compatibility.js Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/webaudio/audionode.html ('k') | LayoutTests/webaudio/audionode-connect-order.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <script src="../resources/js-test.js"></script> 5 <script src="../resources/js-test.js"></script>
6 <script src="resources/compatibility.js"></script>
6 <script type="text/javascript" src="resources/audio-testing.js"></script> 7 <script type="text/javascript" src="resources/audio-testing.js"></script>
7 </head> 8 </head>
8 9
9 <body> 10 <body>
10 <div id="description"></div> 11 <div id="description"></div>
11 <div id="console"></div> 12 <div id="console"></div>
12 13
13 <script> 14 <script>
14 description("Channel mixing rules for AudioNodes."); 15 description("Channel mixing rules for AudioNodes.");
15 16
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (window.testRunner) { 276 if (window.testRunner) {
276 testRunner.dumpAsText(); 277 testRunner.dumpAsText();
277 testRunner.waitUntilDone(); 278 testRunner.waitUntilDone();
278 } 279 }
279 280
280 window.jsTestIsAsync = true; 281 window.jsTestIsAsync = true;
281 282
282 // Create 8-channel offline audio context. 283 // Create 8-channel offline audio context.
283 // Each test will render 8 sample-frames starting at sample-frame position t estNumber * 8. 284 // Each test will render 8 sample-frames starting at sample-frame position t estNumber * 8.
284 var totalFrameLength = numberOfTests * singleTestFrameLength; 285 var totalFrameLength = numberOfTests * singleTestFrameLength;
285 context = new webkitOfflineAudioContext(renderNumberOfChannels, totalFrameLe ngth, sampleRate); 286 context = new OfflineAudioContext(renderNumberOfChannels, totalFrameLength, sampleRate);
286 287
287 // Set destination to discrete mixing. 288 // Set destination to discrete mixing.
288 context.destination.channelCount = renderNumberOfChannels; 289 context.destination.channelCount = renderNumberOfChannels;
289 context.destination.channelCountMode = "explicit"; 290 context.destination.channelCountMode = "explicit";
290 context.destination.channelInterpretation = "discrete"; 291 context.destination.channelInterpretation = "discrete";
291 292
292 // Create test buffers from 1 to 8 channels. 293 // Create test buffers from 1 to 8 channels.
293 testBuffers = new Array(); 294 testBuffers = new Array();
294 for (var i = 0; i < renderNumberOfChannels; ++i) { 295 for (var i = 0; i < renderNumberOfChannels; ++i) {
295 testBuffers[i] = createTestBuffer(i + 1); 296 testBuffers[i] = createTestBuffer(i + 1);
(...skipping 12 matching lines...) Expand all
308 context.oncomplete = checkResult; 309 context.oncomplete = checkResult;
309 context.startRendering(); 310 context.startRendering();
310 } 311 }
311 312
312 runTest(); 313 runTest();
313 314
314 </script> 315 </script>
315 316
316 </body> 317 </body>
317 </html> 318 </html>
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/audionode.html ('k') | LayoutTests/webaudio/audionode-connect-order.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698