OLD | NEW |
1 <video controls></video> | 1 <video controls></video> |
2 <p>Test that an invalid video file generates a MEDIA_ERR_SRC_NOT_SUPPORTED error
and sets networkState to NETWORK_NO_SOURCE.</p> | 2 <p>Test that an invalid video file generates a MEDIA_ERR_SRC_NOT_SUPPORTED error
and sets networkState to NETWORK_NO_SOURCE.</p> |
3 <script src=media-file.js></script> | 3 <script src=media-file.js></script> |
| 4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 5 (Please avoid writing new tests using video-test.js) --> |
4 <script src=video-test.js></script> | 6 <script src=video-test.js></script> |
5 | 7 |
6 <script> | 8 <script> |
7 video.src = findMediaFile("video", "content/garbage"); | 9 video.src = findMediaFile("video", "content/garbage"); |
8 waitForEvent("error", function () { | 10 waitForEvent("error", function () { |
9 testExpected("video.error", "[object MediaError]"); | 11 testExpected("video.error", "[object MediaError]"); |
10 testExpected("video.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED)
; | 12 testExpected("video.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED)
; |
11 testExpected("video.networkState", HTMLMediaElement.NETWORK_NO_SOURCE); | 13 testExpected("video.networkState", HTMLMediaElement.NETWORK_NO_SOURCE); |
12 endTest(); | 14 endTest(); |
13 }); | 15 }); |
14 </script> | 16 </script> |
OLD | NEW |