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

Side by Side Diff: LayoutTests/webaudio/oscillator-ended.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/oscillator-basic.html ('k') | LayoutTests/webaudio/panner-equalpower.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 <head> 2 <head>
3 <script src="../resources/js-test.js"></script> 3 <script src="../resources/js-test.js"></script>
4 <script src="resources/compatibility.js"></script>
4 <script src="resources/audio-testing.js"></script> 5 <script src="resources/audio-testing.js"></script>
5 <script src="resources/audiobuffersource-testing.js"></script> 6 <script src="resources/audiobuffersource-testing.js"></script>
6 <script> 7 <script>
7 var context; 8 var context;
8 var source; 9 var source;
9 10
10 function runTest() 11 function runTest()
11 { 12 {
12 if (window.testRunner) { 13 if (window.testRunner) {
13 testRunner.dumpAsText(); 14 testRunner.dumpAsText();
14 testRunner.waitUntilDone(); 15 testRunner.waitUntilDone();
15 } 16 }
16 17
17 var sampleRate = 44100.0; 18 var sampleRate = 44100.0;
18 var lengthInSeconds = 0.1; 19 var lengthInSeconds = 0.1;
19 context = new webkitOfflineAudioContext(1, sampleRate * lengthInSeco nds, sampleRate); 20 context = new OfflineAudioContext(1, sampleRate * lengthInSeconds, s ampleRate);
20 osc = context.createOscillator(); 21 osc = context.createOscillator();
21 osc.type = "sine"; 22 osc.type = "sine";
22 osc.connect(context.destination); 23 osc.connect(context.destination);
23 osc.onended = function() 24 osc.onended = function()
24 { 25 {
25 testPassed("osc.onended called."); 26 testPassed("osc.onended called.");
26 finishJSTest(); 27 finishJSTest();
27 if (window.testRunner) 28 if (window.testRunner)
28 testRunner.notifyDone(); 29 testRunner.notifyDone();
29 30
30 } 31 }
31 osc.start(0); 32 osc.start(0);
32 osc.stop(0.1); 33 osc.stop(0.1);
33 context.startRendering(); 34 context.startRendering();
34 } 35 }
35 </script> 36 </script>
36 </head> 37 </head>
37 <body onload="runTest()"> 38 <body onload="runTest()">
38 <div>Tests that OscillatorNode calls its onended EventListener.</div> 39 <div>Tests that OscillatorNode calls its onended EventListener.</div>
39 <div id="console"></div> 40 <div id="console"></div>
40 </body> 41 </body>
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/oscillator-basic.html ('k') | LayoutTests/webaudio/panner-equalpower.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698