blob: 5dbec0d970dd8066bb063300e21ef60b361a45d9 [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>audio events - readyState property during canplaythrough</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mediaevents">spec reference</a></p>
<audio id="a" autoplay controls>
</audio>
<div id="log"></div>
<script>
var t = async_test("audio.readyState should be HAVE_ENOUGH_DATA during canplaythrough event", {timeout:30000});
var a = document.getElementById("a");
a.addEventListener("canplaythrough", function() {
t.step(function() {
assert_equals(a.readyState,
a.HAVE_ENOUGH_DATA);
});
t.done();
a.pause();
});
a.src = getAudioURI("http://media.w3.org/2010/05/sound/sound_5") + "?" + new Date() + Math.random();
</script>
</body>
</html>