blob: 608ea5b09bef2b65ccdb089df4660882f8b8b113 [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;
});
var firstProgressEvent = true;
a.addEventListener("progress", function() {
if (!firstProgressEvent) return;
firstProgressEvent = false;
t.step(function() {
assert_true(found_loadstart);
});
t.done();
a.pause();
});
a.src = getAudioURI();
</script>
</body>
</html>