blob: 4365ec4589e744b848154d7f72c2e9a5f0929dbf [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>audio events - readyState property during loadeddata</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_CURRENT_DATA during loadeddata event", {timeout:30000});
var a = document.getElementById("a");
a.addEventListener("loadeddata", function() {
t.step(function() {
assert_true(a.readyState >= a.HAVE_CURRENT_DATA);
});
t.done();
a.pause();
});
a.src = getAudioURI("http://media.w3.org/2010/05/sound/sound_5") + "?" + new Date() + Math.random();
</script>
</body>
</html>