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

Side by Side Diff: LayoutTests/webaudio/delaynode.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 <script src="resources/delay-testing.js"></script> 8 <script src="resources/delay-testing.js"></script>
8 </head> 9 </head>
9 10
10 <body> 11 <body>
11 12
12 <div id="description"></div> 13 <div id="description"></div>
13 <div id="console"></div> 14 <div id="console"></div>
14 15
15 <script> 16 <script>
16 description("Tests attribute and basic functionality of Delay."); 17 description("Tests attribute and basic functionality of Delay.");
17 18
18 function runTest() { 19 function runTest() {
19 if (window.testRunner) { 20 if (window.testRunner) {
20 testRunner.dumpAsText(); 21 testRunner.dumpAsText();
21 testRunner.waitUntilDone(); 22 testRunner.waitUntilDone();
22 } 23 }
23 24
24 window.jsTestIsAsync = true; 25 window.jsTestIsAsync = true;
25 26
26 // Create offline audio context. 27 // Create offline audio context.
27 var context = new webkitOfflineAudioContext(1, sampleRate * renderLengthSeco nds, sampleRate); 28 var context = new OfflineAudioContext(1, sampleRate * renderLengthSeconds, s ampleRate);
28 var toneBuffer = createToneBuffer(context, 20, 20 * toneLengthSeconds, sampl eRate); // 20Hz tone 29 var toneBuffer = createToneBuffer(context, 20, 20 * toneLengthSeconds, sampl eRate); // 20Hz tone
29 30
30 var bufferSource = context.createBufferSource(); 31 var bufferSource = context.createBufferSource();
31 bufferSource.buffer = toneBuffer; 32 bufferSource.buffer = toneBuffer;
32 33
33 var delay = context.createDelay(); 34 var delay = context.createDelay();
34 35
35 window.delay = delay; 36 window.delay = delay;
36 shouldBeTrue("delay.numberOfInputs === 1"); 37 shouldBeTrue("delay.numberOfInputs === 1");
37 shouldBeTrue("delay.numberOfOutputs === 1"); 38 shouldBeTrue("delay.numberOfOutputs === 1");
(...skipping 12 matching lines...) Expand all
50 context.oncomplete = checkDelayedResult(toneBuffer); 51 context.oncomplete = checkDelayedResult(toneBuffer);
51 context.startRendering(); 52 context.startRendering();
52 } 53 }
53 54
54 runTest(); 55 runTest();
55 56
56 </script> 57 </script>
57 58
58 </body> 59 </body>
59 </html> 60 </html>
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/decode-audio-data-basic.html ('k') | LayoutTests/webaudio/delaynode-max-default-delay.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698