OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <head> | |
3 <script src="../resources/js-test.js"></script> | |
4 <script src="resources/compatibility.js"></script> | |
5 <script src="resources/audit-util.js"></script> | |
6 <script src="resources/audio-testing.js"></script> | |
7 <script src="resources/audiobuffersource-testing.js"></script> | |
8 <script> | |
9 var context; | |
10 var source; | |
11 | |
12 function runTest() | |
13 { | |
14 if (window.testRunner) { | |
15 testRunner.dumpAsText(); | |
16 testRunner.waitUntilDone(); | |
17 } | |
18 | |
19 var sampleRate = 44100.0; | |
20 var lengthInSeconds = 0.1; | |
21 context = new OfflineAudioContext(1, sampleRate * lengthInSeconds, s
ampleRate); | |
22 osc = context.createOscillator(); | |
23 osc.type = "sine"; | |
24 osc.connect(context.destination); | |
25 osc.onended = function() | |
26 { | |
27 testPassed("osc.onended called."); | |
28 finishJSTest(); | |
29 if (window.testRunner) | |
30 testRunner.notifyDone(); | |
31 | |
32 } | |
33 osc.start(0); | |
34 osc.stop(0.1); | |
35 context.startRendering(); | |
36 } | |
37 </script> | |
38 </head> | |
39 <body onload="runTest()"> | |
40 <div>Tests that OscillatorNode calls its onended EventListener.</div> | |
41 <div id="console"></div> | |
42 </body> | |
OLD | NEW |