<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>&lt;video&gt; and &lt;source&gt; error test</title>
        <script src=video-test.js></script>

        <script>

            var sources = [];

            function loadeddata()
            {
                consoleWrite("");
                testExpected("relativeURL(video.currentSrc)", "content/test.mp4");
                testExpected("video.error", null);
                consoleWrite("");
                endTest();
            }

            function errorEvent(evt)
            {
                var ndx;
                for (ndx = 0; ndx < sources.length; ndx++) {
                    if (sources[ndx] == evt.target)
                        break;
                }

                if (sources[ndx] == evt.target)
                    logResult(true, "EVENT(error) from &lt;source id='<em>" + evt.target.id + "</em>' src='<em>" + relativeURL(evt.target.src) + "</em>'&gt;");
                else
                    logResult(false, "EVENT(error) from " + evt.target);

                testExpected("video.error", null);
                consoleWrite("");
            }

            function start()
            {
                findMediaElement();

                sources = document.getElementsByTagName('source');

                document.addEventListener("error", errorEvent, true);
                waitForEvent("loadstart");
                waitForEvent("waiting");
                waitForEvent("ratechange");
                waitForEvent("durationchange");
                waitForEvent("pause");
                waitForEvent("play");
                waitForEvent("playing");

                waitForEvent('loadeddata', loadeddata);
            }
        </script>
    </head>

    <body onload="start()">

        <video controls>
            <source id=missing-src type="video/blahblah">
            <source id=bogus-type src=content/test.mp4 type="video/blahblah">
            <source id=unsupported-media-query src=content/test.mp4 media=print>
            <source id=missing-file src=content/error2.mpeg type=video/mpeg>
            <source id=format-error src="content/unsupported_track.mov">
            <source id=supported-format src=content/test.mp4 type="video/mpeg; codecs=&quot;avc1.4D400C&quot;">
        </video>
        
        <p>1. Test that errors fired while evaluating/loading &lt;source&gt; elements are fired at the
        &lt;source&gt; and not at the &lt;video&gt; element.
        <br>2. Verifiy that an 'error' event fired while processing/loading a &lt;source&gt; element 
        does not set the media element's 'error' attribute.</p>

    </body>
</html>
