blob: 75b9c85bdd32770c7473f3a98d682d08152da8f6 [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>video events - loadstart, then progress</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("setting src attribute on autoplay video should trigger loadstart then progress event", {timeout:30000});
var v = document.getElementById("v");
var found_loadstart = false;
v.addEventListener("loadstart", function() {
found_loadstart = true;
});
v.addEventListener("progress", function() {
t.step(function() {
assert_true(found_loadstart);
});
t.done();
v.pause();
}, { once: true });
v.src = getVideoURI();
</script>
</body>
</html>