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

Side by Side Diff: LayoutTests/webaudio/stereo2mono-down-mixing.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
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 src="resources/audio-testing.js"></script> 7 <script src="resources/audio-testing.js"></script>
7 </head> 8 </head>
8 9
9 <body> 10 <body>
10 11
11 <div id="description"></div> 12 <div id="description"></div>
12 <div id="console"></div> 13 <div id="console"></div>
13 14
14 <script> 15 <script>
15 description("This test verifies whether down mixing from stereo to mono will cau se assertion error."); 16 description("This test verifies whether down mixing from stereo to mono will cau se assertion error.");
(...skipping 27 matching lines...) Expand all
43 44
44 function runTest() { 45 function runTest() {
45 if (window.testRunner) { 46 if (window.testRunner) {
46 testRunner.dumpAsText(); 47 testRunner.dumpAsText();
47 testRunner.waitUntilDone(); 48 testRunner.waitUntilDone();
48 } 49 }
49 50
50 window.jsTestIsAsync = true; 51 window.jsTestIsAsync = true;
51 52
52 // Create offline audio context, the destination is mono. 53 // Create offline audio context, the destination is mono.
53 context = new webkitOfflineAudioContext(1, sampleRate * renderLengthSeconds, sampleRate); 54 context = new OfflineAudioContext(1, sampleRate * renderLengthSeconds, sampl eRate);
54 // Create a stereo AudioBuffer. 55 // Create a stereo AudioBuffer.
55 toneBuffer = createDataBuffer(context, renderLengthSeconds); 56 toneBuffer = createDataBuffer(context, renderLengthSeconds);
56 57
57 bufferSource = context.createBufferSource(); 58 bufferSource = context.createBufferSource();
58 bufferSource.buffer = toneBuffer; 59 bufferSource.buffer = toneBuffer;
59 60
60 bufferSource.connect(context.destination); 61 bufferSource.connect(context.destination);
61 62
62 bufferSource.start(0); 63 bufferSource.start(0);
63 64
64 context.oncomplete = testFinished; 65 context.oncomplete = testFinished;
65 context.startRendering(); 66 context.startRendering();
66 } 67 }
67 68
68 69
69 runTest(); 70 runTest();
70 71
71 </script> 72 </script>
72 73
73 </body> 74 </body>
74 </html> 75 </html>
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/scriptprocessornode-zero-input-channels.html ('k') | LayoutTests/webaudio/test-basic.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698