4 <script src=media-file.js
></script>
5 <script src=video-test.js
></script>
11 logResult(false, "*** \"" + relativeURL(video
.currentSrc
) + "\" should not have been processed!" );
18 video
= document
.createElement("video");
19 video
.setAttribute("controls", "controls");
21 // The first source should load.
22 var source
= document
.createElement("source");
23 source
.setAttribute("src", findMediaFile("video", "content/test"));
24 source
.setAttribute("type", mimeTypeForFile(source
.getAttribute("src")));
25 video
.appendChild(source
);
27 // The second source is bogus and won't load, but it should never be processed.
28 source
= document
.createElement("source");
29 source
.setAttribute("src", findMediaFile("video", "content/does-not-exist"));
30 source
.setAttribute("type", mimeTypeForFile(source
.getAttribute("src")));
31 video
.appendChild(source
);
33 document
.body
.appendChild(video
);
35 waitForEvent('error', errorEvent
);
36 waitForEvent('loadedmetadata', endTest
);
42 <body onload=
"setup()">
44 <p>Test that a single valid
<source
> element loads correctly
</p>