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

Unified Diff: LayoutTests/media/media-element-play-after-eos.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
Index: LayoutTests/media/media-element-play-after-eos.html
diff --git a/LayoutTests/media/media-element-play-after-eos.html b/LayoutTests/media/media-element-play-after-eos.html
index 8d4ccde31f09a80490777cf10f0a95e4fa8dafab..67e608dfd76ee8f8c30df4b00d1f39d6d7b7582f 100644
--- a/LayoutTests/media/media-element-play-after-eos.html
+++ b/LayoutTests/media/media-element-play-after-eos.html
@@ -15,7 +15,7 @@
function mediaLoadedMetadata()
{
- waitForEvent("playing", mediaPlaying);
+ waitForEventOnce("playing", mediaPlaying);
waitForEvent("pause", mediaPause);
waitForEvent("ended", mediaEnded);
run("mediaElement.play()");
@@ -34,11 +34,14 @@
function mediaEnded()
{
testExpected("mediaElement.ended", true);
-
- if (repeated)
+
+ if (repeated) {
endTest();
-
+ return;
+ }
+
repeated = true;
+ waitForEventOnce("playing", mediaPlaying);
run("mediaElement.play()");
}
@@ -48,4 +51,3 @@
<p>This tests ensure that media element emits the 'playing' event every time it starts playing after eos. It also ensure that 'pause' and 'ended' events are sent when media playback ends.</p>
</body>
</html>
-
« no previous file with comments | « LayoutTests/media/media-controls-invalid-url.html ('k') | LayoutTests/media/media-fragments/media-fragments.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698