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

Unified Diff: LayoutTests/media/video-preload-none-no-stalled-event.html

Issue 327553002: Transition networkState back to NETWORK_IDLE on fetch if preload=none (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. 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/media/video-preload-none-no-stalled-event.html
diff --git a/LayoutTests/media/video-preload-none-no-stalled-event.html b/LayoutTests/media/video-preload-none-no-stalled-event.html
new file mode 100644
index 0000000000000000000000000000000000000000..80257120e01187b10282fc55dfc037a7dad1529c
--- /dev/null
+++ b/LayoutTests/media/video-preload-none-no-stalled-event.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src=media-file.js></script>
+<script src=video-test.js></script>
+<script>
+function runTest()
+{
+ findMediaElement();
+
+ waitForEvent("suspend");
+ waitForEventAndFail("stalled");
+ consoleWrite("");
+
+ video.src = findMediaFile("video", "content/test");
+
+ // Give the progress timer enoug time to fire a 'stalled' event.
acolwell GONE FROM CHROMIUM 2014/06/09 17:54:17 nit: s/enoug/enough/
+ // (3s timeout + 0.5s slack)
+ setTimeout(endTest, 3000 + 500);
acolwell GONE FROM CHROMIUM 2014/06/09 17:54:17 This seems brittle. How about using waitForEventAn
fs 2014/06/10 12:36:24 SGTM. Done.
+}
+</script>
+<body onload="runTest()">
+ <p>Test to see if a media element with preload=none dispatches a 'stalled' event.</p>
+ <video preload=none></video>
+</body>

Powered by Google App Engine
This is Rietveld 408576698