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