antti@apple.com | ed20af6 | 2008-01-17 00:34:50 +0000 | [diff] [blame] | 1 | <video controls></video> |
commit-queue@webkit.org | 1044a81 | 2011-12-22 00:25:17 +0000 | [diff] [blame] | 2 | <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.org | 9d9ccc1 | 2011-02-24 23:10:46 +0000 | [diff] [blame] | 3 | <script src=media-file.js></script> |
| 4 | <script src=video-test.js></script> |
eric.carlson@apple.com | 656a763 | 2009-03-04 01:06:50 +0000 | [diff] [blame] | 5 | |
antti@apple.com | ed20af6 | 2008-01-17 00:34:50 +0000 | [diff] [blame] | 6 | <script> |
eric@webkit.org | 92e050c | 2009-09-24 01:20:43 +0000 | [diff] [blame] | 7 | video.src = findMediaFile("video", "content/garbage"); |
eric.carlson@apple.com | 656a763 | 2009-03-04 01:06:50 +0000 | [diff] [blame] | 8 | waitForEvent("error", function () { |
| 9 | testExpected("video.error", "[object MediaError]"); |
commit-queue@webkit.org | 1044a81 | 2011-12-22 00:25:17 +0000 | [diff] [blame] | 10 | testExpected("video.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED); |
| 11 | testExpected("video.networkState", HTMLMediaElement.NETWORK_NO_SOURCE); |
eric.carlson@apple.com | 656a763 | 2009-03-04 01:06:50 +0000 | [diff] [blame] | 12 | endTest(); |
| 13 | }); |
antti@apple.com | ed20af6 | 2008-01-17 00:34:50 +0000 | [diff] [blame] | 14 | </script> |