3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4 <title><video> and <source> error test</title>
5 <script src=media-file.js></script>
6 <script src=video-test.js></script>
15 testExpected("relativeURL(video.currentSrc)", findMediaFile("video", "content/test"));
16 testExpected("video.error", null);
21 function errorEvent(evt)
24 for (ndx = 0; ndx < sources.length; ndx++) {
25 if (sources[ndx] == evt.target)
29 if (sources[ndx] == evt.target)
30 logResult(true, "EVENT(error) from <source id='<em>" + evt.target.id + "</em>' src='<em>" + relativeURL(evt.target.src) + "</em>'>");
32 logResult(false, "EVENT(error) from " + evt.target);
34 testExpected("video.error", null);
42 sources = document.getElementsByTagName('source');
44 document.addEventListener("error", errorEvent, true);
45 waitForEvent("loadstart");
46 waitForEvent("waiting");
47 waitForEvent("ratechange");
48 waitForEvent("durationchange");
49 waitForEvent("pause");
51 waitForEvent("playing");
53 waitForEvent('loadeddata', loadeddata);
61 <source id=missing-src type="video/blahblah">
62 <source id=bogus-type src=content/test.mp4 type="video/blahblah">
63 <source id=unsupported-media-query src=content/test.mp4 media=print>
64 <source id=missing-file src=content/error2.mpeg type=video/mpeg>
65 <source id=format-error src="content/unsupported_track.mov">
66 <source id=supported-format-mp4 src=content/test.mp4 type="video/mp4; codecs="avc1.4D400C"">
67 <source id=supported-format-ogv src=content/test.ogv type="video/ogg">
70 <p>1. Test that errors fired while evaluating/loading <source> elements are fired at the
71 <source> and not at the <video> element.
72 <br>2. Verifiy that an 'error' event fired while processing/loading a <source> element
73 does not set the media element's 'error' attribute.</p>
75 <script>start()</script>