blob: a65963f319177aac439fe3202f81fbb75768dd96 [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="a" 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 a = document.getElementById("a");
var found_loadstart = false;
a.addEventListener("loadstart", function() {
found_loadstart = true;
});
a.addEventListener("progress", function() {
t.step(function() {
assert_true(found_loadstart);
});
t.done();
a.pause();
}, { once: true });
a.src = getAudioURI();
</script>
</body>
</html>