3 <script src=media-file.js></script>
4 <script src=video-test.js></script>
8 function loadedmetadata()
10 failTest(relativeURL(video.currentSrc) + "loaded but should not" );
16 testExpected("video.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED);
18 // "setTimeout()" is generally bad form in a layout test, but we need to verify
19 // that changing the 'src' attribute does not do something that happens
20 // asynchronously so we don't have a lot of options.
21 setTimeout(function () { endTest(); }, 200) ;
22 run("video.removeAttribute('src')");
30 video.src = "bogus.mov";
32 var source = document.createElement("source");
33 source.setAttribute("src", findMediaFile("video", "content/test"));
34 video.appendChild(source);
36 waitForEvent('loadedmetadata', loadedmetadata);
37 waitForEvent('error', errorEvent);
43 <body onload="setup()">
45 <video controls></video>
47 <p>Test that removing 'src' attribute does NOT trigger load of <source> elements</p>