3 <script src=
"../resources/js-test.js"></script>
4 <script src=
"resources/audio-testing.js"></script>
5 <script src=
"resources/compatibility.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 numberOfFrames
= 32;
20 context
= new OfflineAudioContext(1, numberOfFrames
, sampleRate
);
21 source
= context
.createBufferSource();
22 source
.buffer
= createTestBuffer(context
, numberOfFrames
);
23 source
.connect(context
.destination
);
24 source
.onended = function()
26 testPassed("source.onended called.");
27 if (window
.testRunner
)
28 testRunner
.notifyDone();
31 context
.startRendering();
36 <body onload=
"runTest()">
37 <div>Tests that AudioBufferSourceNode calls its onended EventListener.
</div>
38 <div id=
"console"></div>