3 <script src=
"../resources/js-test.js"></script>
4 <script src=
"resources/compatibility.js"></script>
5 <script src=
"resources/audio-testing.js"></script>
6 <script src=
"resources/audiobuffersource-testing.js"></script>
13 if (window
.testRunner
) {
14 testRunner
.dumpAsText();
15 testRunner
.waitUntilDone();
18 var sampleRate
= 44100.0;
19 var lengthInSeconds
= 0.1;
20 context
= new OfflineAudioContext(1, sampleRate
* lengthInSeconds
, sampleRate
);
21 osc
= context
.createOscillator();
23 osc
.connect(context
.destination
);
24 osc
.onended = function()
26 testPassed("osc.onended called.");
28 if (window
.testRunner
)
29 testRunner
.notifyDone();
34 context
.startRendering();
38 <body onload=
"runTest()">
39 <div>Tests that OscillatorNode calls its onended EventListener.
</div>
40 <div id=
"console"></div>