blob: 7c945f80c888b1a4c66e78f8e427938c7ea9a803 [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>video 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>
<video id="v" autoplay controls>
</video>
<div id="log"></div>
<script>
var t = async_test("video.readyState should be HAVE_ENOUGH_DATA during canplaythrough event", {timeout:30000});
var v = document.getElementById("v");
v.addEventListener("canplaythrough", function() {
t.step(function() {
assert_equals(v.readyState,
v.HAVE_ENOUGH_DATA);
});
t.done();
v.pause();
});
v.src = getVideoURI("http://media.w3.org/2010/05/video/movie_300") + "?" + new Date() + Math.random();
</script>
</body>
</html>