28 lines
884 B
HTML
28 lines
884 B
HTML
<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>
|