Index: LayoutTests/http/tests/media/video-load-metadata-decode-error.html |
diff --git a/LayoutTests/http/tests/media/video-load-metadata-decode-error.html b/LayoutTests/http/tests/media/video-load-metadata-decode-error.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0a3db05112ea41f6279cf900e3a180580cb752f8 |
--- /dev/null |
+++ b/LayoutTests/http/tests/media/video-load-metadata-decode-error.html |
@@ -0,0 +1,39 @@ |
+<html> |
+<head> |
+ <title>Loading corrupted video with proper metadata</title> |
+ <script src=../../../media-resources/media-file.js></script> |
+ <script src=../../../media-resources/video-test.js></script> |
+ <script> |
+ function loadedmetadata(e) |
+ { |
+ consoleWrite("loaded metadata of media file"); |
+ } |
+ |
+ function error(e) |
+ { |
+ consoleWrite("failed to load media file"); |
+ testExpected("video.networkState", HTMLMediaElement.NETWORK_IDLE); |
+ endTest(); |
+ } |
+ |
+ function start() |
+ { |
+ findMediaElement(); |
+ |
+ waitForEvent('loadedmetadata', loadedmetadata); |
+ waitForEvent("error", error); |
+ |
+ var movie = findMediaFile("video", "resources/test"); |
+ var type = mimeTypeForExtension(movie.split('.').pop()); |
+ video.src = "video-load-metadata-decode-error.cgi?name=" + movie + "&type=" + type; |
+ video.play(); |
+ } |
+ </script> |
+</head> |
+<body onload="start()"> |
+<video id="video"></video> |
+<p> |
+This test case simulates a decode error after loading meta data of a video.<br/><br/> |
+</p> |
+</body> |
+</html> |