Chromium Code Reviews| 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..7aaa9448868856bf35e666680422bb3c92872815 |
| --- /dev/null |
| +++ b/LayoutTests/http/tests/media/video-load-metadata-decode-error.html |
| @@ -0,0 +1,40 @@ |
| +<html> |
| +<head> |
| + <title>throttled loading metadata</title> |
| + <script src=../../../media-resources/media-file.js></script> |
| + <script src=../../../media-resources/video-test.js></script> |
| + <script> |
| + function loadedmetadata(e) |
| + { |
| + logResult(true, "loaded metadata of media file"); |
| + } |
| + |
| + function error(e) |
| + { |
| + logResult(true, "failed to load media file"); |
|
acolwell GONE FROM CHROMIUM
2014/06/18 23:46:27
nit: Just use consoleWrite() here and above since
Srirama
2014/06/19 03:35:15
will do it.
On 2014/06/18 23:46:27, acolwell wrote
|
| + testExpected("video.networkState", 1); |
|
acolwell GONE FROM CHROMIUM
2014/06/18 23:46:27
s/1/HTMLMediaElement.NETWORK_IDLE to make it clear
Srirama
2014/06/19 03:35:15
will do it.
On 2014/06/18 23:46:27, acolwell wrote
|
| + endTest(); |
| + } |
| + |
| + function start() |
| + { |
| + findMediaElement(); |
| + |
| + waitForEvent('loadedmetadata', loadedmetadata); |
| + waitForEvent("error", error); |
| + |
| + var movie = findMediaFile("video", "resources/test"); |
| + var type = mimeTypeForExtension(movie.split('.').pop()); |
| + video.src = "http://127.0.0.1:8000/media/video-load-metadata-decode-error.cgi?name=" + movie + "&type=" + type; |
|
acolwell GONE FROM CHROMIUM
2014/06/18 23:46:27
nit: Do you really need the scheme and host? Will
Srirama
2014/06/19 03:35:16
May not be required, will check and remove.
On 201
|
| + video.load(); |
| + video.play(); |
|
acolwell GONE FROM CHROMIUM
2014/06/18 23:46:27
You should only need load() or play(). I don't thi
Srirama
2014/06/19 03:35:16
I think there is a problem without play(). May be
|
| + } |
| + </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> |