blob: ed789c7d5206cedc1374feef604e85d341891024 [file] [log] [blame]
<!DOCTYPE html>
<head>
<script src="../resources/js-test-pre.js"></script>
<script src="resources/audio-testing.js"></script>
<script src="resources/audiobuffersource-testing.js"></script>
<script>
var context;
var source;
function runTest()
{
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var sampleRate = 44100.0;
var lengthInSeconds = 0.1;
context = new webkitOfflineAudioContext(1, sampleRate * lengthInSeconds, sampleRate);
osc = context.createOscillator();
osc.type = "sine";
osc.connect(context.destination);
osc.onended = function()
{
testPassed("osc.onended called.");
finishJSTest();
if (window.testRunner)
testRunner.notifyDone();
}
osc.start(0);
osc.stop(0.1);
context.startRendering();
}
</script>
</head>
<body onload="runTest()">
<div>Tests that OscillatorNode calls its onended EventListener.</div>
<div id="console"></div>
</body>