gecko/content/media/webaudio/test/test_bug938022.html
Tony Young 7d51ca8e91 test for bug 938022
--HG--
extra : transplant_source : %FE%A1%93%10%AE%86C%F7G%00%9B%E3Y%F7%08%DF%A26%1A%5B
2014-02-18 10:17:29 +13:00

29 lines
801 B
HTML

<!DOCTYPE HTML>
<html>
<head>
<title>Test audio element currentTime is correct when used as media source</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
var context = new AudioContext();
var audio = new Audio("small-shot.ogg");
audio.load();
audio.addEventListener("playing", function (e) {
ok(this.currentTime == 0, "currentTime must be zero");
SimpleTest.finish();
});
audio.play();
var source = context.createMediaElementSource(audio);
source.connect(context.destination);
});
</script>
</pre>
</body>
</html>