Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Unified Diff: LayoutTests/http/tests/media/video-load-metadata-decode-error.html

Issue 330593005: HTMLMediaElement::webMediaPlayer() should never be null if m_readyState >= HAVE_METADATA (media eng… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updated as per review comments Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698