<!doctype html>
<html>
<head>
<title>video.src - reflection test</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-media-src">spec reference</a></p>
<video id="video">
</video>
<div id="log"></div>
<script>
var t = async_test("removing src attribute should not trigger loadstart event", {timeout:10000});
var removed_attr = false;
var test_done = false;
var v = document.getElementById("video");
v.addEventListener("loadstart", function() {
if (!removed_attr) {
window.setTimeout(function() {
removed_attr = true;
v.removeAttribute("src");
}, 0);
window.setTimeout(function() {
if (test_done) { return; }
test_done = true;
t.step(function(){ assert_true(true); });
t.done();
}, 1000);
return;
}
if (test_done) { return; }
test_done = true;
t.step(function(){ assert_false(true); });
t.done();
});
v.src = getVideoURI("http://media.w3.org/2010/05/video/movie_300") + "?" + new Date() + Math.random();
</script>
</body>
</html>