3 <script src=media-file.js
></script>
4 <script src=video-test.js
></script>
7 var panel
= document
.getElementById("panel");
8 var mediaFile
= findMediaFile("video", "content/test");
9 panel
.innerHTML
= "<video src=" + mediaFile
+ " controls onloadedmetadata='loadedmetadata()'><source src=content/counting.mp4></video>";
12 <p>Test that removing valid 'src' attribute DOES NOT trigger load of
<source
> elements
</p>
21 testExpected("stripExtension(relativeURL(video.currentSrc))", stripExtension(mediaFile
));
22 testExpected("isNaN(video.duration)", false);
26 function loadedmetadata()
28 consoleWrite("EVENT(loadedmetadata)");
34 run("video.removeAttribute('src')");
38 consoleWrite("<span style='color:red'>FAIL</span> : 'loadCount' fired " + loadCount
+ "times" );
42 setTimeout(someTimeLater
, 100) ;
45 function someTimeLater()