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

Unified Diff: LayoutTests/media/video-seeking.html

Issue 17395006: Fix LayoutTests that assume canplay, playing, and canplaythrough will only fire once. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix event-attributes expectations. Created 7 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
« no previous file with comments | « LayoutTests/media/video-seek-past-end-playing.html ('k') | LayoutTests/media/video-seeking-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/video-seeking.html
diff --git a/LayoutTests/media/video-seeking.html b/LayoutTests/media/video-seeking.html
index a8c6b5aec9efc1369440ef5cc9342eb1ce9a1094..161ae9b3cd385da2c47f648a8fab1c0a22050e53 100644
--- a/LayoutTests/media/video-seeking.html
+++ b/LayoutTests/media/video-seeking.html
@@ -10,30 +10,37 @@
var seekedCount = 0;
function seeked()
- {
- ++seekedCount;
+ {
+ ++seekedCount;
consoleWrite("");
testExpected("video.seeking", false);
testExpected("video.currentTime", seekedCount * 0.5);
+
+ if (seekedCount == 3) {
+ endTest();
+ return;
+ }
+
run("video.currentTime = " + (seekedCount + 1) * 0.5);
testExpected("video.seeking", true);
consoleWrite("");
- if (seekedCount == 3)
- endTest();
}
- function canplaythrough()
+ function canplaythrough()
{
+ if (seekedCount > 0)
+ return;
+
run("video.currentTime = 0.5");
consoleWrite("");
}
-
+
waitForEvent('waiting' );
waitForEvent('seeked', seeked );
- waitForEvent('canplaythrough', canplaythrough);
+ waitForEventOnce('canplaythrough', canplaythrough);
video.src = findMediaFile("video", "content/test");
</script>
« no previous file with comments | « LayoutTests/media/video-seek-past-end-playing.html ('k') | LayoutTests/media/video-seeking-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698