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

Side by Side Diff: LayoutTests/webaudio/up-mixing-mono-stereo.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 <!-- 3 <!--
4 Test up mixing from mono to stereo. 4 Test up mixing from mono to stereo.
5 --> 5 -->
6 6
7 <html> 7 <html>
8 <head> 8 <head>
9 <script type="text/javascript" src="resources/audio-testing.js"></script> 9 <script type="text/javascript" src="resources/audio-testing.js"></script>
10 <script type="text/javascript" src="resources/mix-testing.js"></script> 10 <script type="text/javascript" src="resources/mix-testing.js"></script>
11 </head> 11 </head>
12 <body> 12 <body>
13 13
14 <script> 14 <script>
15 15
16 function runTest() { 16 function runTest() {
17 if (!window.testRunner) 17 if (!window.testRunner)
18 return; 18 return;
19 19
20 testRunner.waitUntilDone(); 20 testRunner.waitUntilDone();
21 21
22 window.jsTestAsync = true; 22 window.jsTestAsync = true;
23 23
24 // Create offline audio context 24 // Create offline audio context
25 var sampleRate = 44100.0; 25 var sampleRate = 44100.0;
26 var context = new webkitOfflineAudioContext(2, sampleRate * toneLengthSecond s, sampleRate); 26 var context = new OfflineAudioContext(2, sampleRate * toneLengthSeconds, sam pleRate);
27 var toneBuffer = createToneBuffer(context, 440, toneLengthSeconds, 1); 27 var toneBuffer = createToneBuffer(context, 440, toneLengthSeconds, 1);
28 28
29 var source = context.createBufferSource(); 29 var source = context.createBufferSource();
30 source.buffer = toneBuffer; 30 source.buffer = toneBuffer;
31 31
32 source.connect(context.destination); 32 source.connect(context.destination);
33 source.start(0); 33 source.start(0);
34 34
35 context.oncomplete = finishAudioTest; 35 context.oncomplete = finishAudioTest;
36 context.startRendering(); 36 context.startRendering();
37 } 37 }
38 38
39 runTest(); 39 runTest();
40 </script> 40 </script>
41 41
42 </body> 42 </body>
43 </html> 43 </html>
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/up-mixing-mono-51.html ('k') | LayoutTests/webaudio/up-mixing-stereo-51.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698