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

Unified Diff: LayoutTests/media/video-loop-expected.txt

Issue 898883003: Fixes play seek when user sets loop after ended. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Minor cleanup Created 5 years, 10 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-loop-expected.txt
diff --git a/LayoutTests/media/video-loop-expected.txt b/LayoutTests/media/video-loop-expected.txt
index 2e5fa758000e390c2a127da59b7d005fb2672745..d419e9565015de9c8aaaadf0132d33fdb10b986c 100644
--- a/LayoutTests/media/video-loop-expected.txt
+++ b/LayoutTests/media/video-loop-expected.txt
@@ -4,6 +4,8 @@ Play to end with 'loop' set to true.
When 'seeked' event fires, verify that time has jumped back and movie is playing.
Set 'loop' to false and play again.
Verify that 'ended' event fires.
+Set 'loop' to true now that video is ended. Call play again.
+Verify 'seeked' event fires, verify that time has jumped back and movie is playing.
++ Test setting/removing the attribute.
EXPECTED (video.getAttribute('loop') == 'null') OK
EXPECTED (video.loop == 'false') OK
@@ -46,7 +48,7 @@ RUN(video.currentTime = video.duration - 0.4)
EVENT(pause)
EVENT(seeked)
-++ third seek completed, beginning playback for the last time.
+++ third seek completed, unset loop and let play to the end.
EXPECTED (video.paused == 'true') OK
EXPECTED (video.ended == 'false') OK
RUN(video.play())
@@ -59,5 +61,22 @@ EVENT(ended)
EXPECTED (video.ended == 'true') OK
EXPECTED (mediaElement.currentTime == 'mediaElement.duration') OK
+++ with ended == true, set loop and play again.
+EXPECTED (video.loop == 'false') OK
+RUN(video.loop = true)
+EXPECTED (video.loop == 'true') OK
+EXPECTED (video.ended == 'false') OK
+RUN(video.play())
+
+EVENT(play)
+EVENT(seeked)
+
+++ fourth seek completed.
+EXPECTED (mediaElement.currentTime < 'mediaElement.duration') OK
+EXPECTED (video.loop == 'true') OK
+EXPECTED (video.paused == 'false') OK
+EXPECTED (video.ended == 'false') OK
+RUN(video.pause())
+
END OF TEST

Powered by Google App Engine
This is Rietveld 408576698