blob: bc02e61f86d39aa668119e31c2a1d974d7bc5218 [file] [log] [blame]
<html>
<body>
<script src=media-file.js></script>
<script src=video-test.js></script>
<video controls>
<source src=content/test.mp4 type="video/mpeg; codecs=&quot;avc1.4D400C&quot;">
<source src=content/test.ogv type="video/ogg; codecs=&quot;theora,vorbis&quot;">
</video>
<script>
findMediaElement();
var counter = 0;
function checkLoad()
{
consoleWrite("");
testExpected("relativeURL(video.currentSrc)", findMediaFile("video", "content/test"));
if (++counter == 2)
endTest();
run("video.src = 'content/silence.mpg'");
setTimeout(checkLoad, 200);
consoleWrite("");
};
waitForEvent("loadstart");
waitForEvent("waiting");
waitForEvent("ratechange");
waitForEvent("durationchange");
waitForEvent("loadeddata");
waitForEvent("canplay");
waitForEvent("loadedmetadata");
waitForEvent("play");
waitForEvent("canplaythrough", checkLoad);
</script>
<p>Test that adding a 'src' attribute does nothing when a &lt;source&gt; element has already
been chosen
</p>
</body>
</html>