blob: 35015bc502821e9ff273f6b203cbdf9a6d202722 [file] [log] [blame]
<p>Test that the media element is in correct state after load fails.</p>
<video controls></video>
<script src=video-test.js></script>
<script>
consoleWrite("");
testExpected("video.error", null);
waitForEventAndTest("canplaythrough", "false");
waitForEvent("error", function () {
testExpected("video.error", null, "!=");
testExpected("video.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED);
testExpected("video.networkState", HTMLMediaElement.NETWORK_NO_SOURCE);
testExpected("isNaN(video.duration)", true);
testExpected("video.currentTime", 0);
testExpected("video.buffered.length", 0);
testExpected("video.seekable.length", 0);
testExpected("video.buffered.length", 0);
endTest();
});
video.src = "content/does-not-exist.mpeg";
consoleWrite("");
</script>