blob: 331c8ae85039fbbca52769a75d28313cc3fb6f31 [file] [log] [blame]
antti@apple.comed20af62008-01-17 00:34:50 +00001<video controls></video>
commit-queue@webkit.org1044a812011-12-22 00:25:17 +00002<p>Test that an invalid video file generates a MEDIA_ERR_SRC_NOT_SUPPORTED error and sets networkState to NETWORK_NO_SOURCE.</p>
mihaip@chromium.org9d9ccc12011-02-24 23:10:46 +00003<script src=media-file.js></script>
4<script src=video-test.js></script>
eric.carlson@apple.com656a7632009-03-04 01:06:50 +00005
antti@apple.comed20af62008-01-17 00:34:50 +00006<script>
eric@webkit.org92e050c2009-09-24 01:20:43 +00007 video.src = findMediaFile("video", "content/garbage");
eric.carlson@apple.com656a7632009-03-04 01:06:50 +00008 waitForEvent("error", function () {
9 testExpected("video.error", "[object MediaError]");
commit-queue@webkit.org1044a812011-12-22 00:25:17 +000010 testExpected("video.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED);
11 testExpected("video.networkState", HTMLMediaElement.NETWORK_NO_SOURCE);
eric.carlson@apple.com656a7632009-03-04 01:06:50 +000012 endTest();
13 });
antti@apple.comed20af62008-01-17 00:34:50 +000014</script>