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

Unified Diff: LayoutTests/media/media-controller-playbackrate.html

Issue 456343002: Relanding 'Always notify the MediaPlayer of any seek' patch (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed test failures Created 5 years, 11 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-controller-playbackrate.html
diff --git a/LayoutTests/media/media-controller-playbackrate.html b/LayoutTests/media/media-controller-playbackrate.html
index 3ea2ed562e1599ee5b7c41429f21ee91e6d88d32..7df5e4b92ee693d4e1384ce778d91101690dfd38 100644
--- a/LayoutTests/media/media-controller-playbackrate.html
+++ b/LayoutTests/media/media-controller-playbackrate.html
@@ -4,13 +4,15 @@
<script src=media-file.js></script>
<script src=video-test.js></script>
<script>
- var start = function() {
philipj_slow 2015/01/09 14:10:25 Both styles are OK by http://www.chromium.org/blin
+ var start = function()
+ {
findMediaElement();
- waitForEvent('canplay',canplay);
+ waitForEventOnce('canplay',canplay);
video.src = findMediaFile('video', 'content/test');
};
- var canplay = function() {
+ var canplay = function()
+ {
video.mediaGroup = "group";
// Test non-finite rates.
@@ -32,17 +34,23 @@
waitForEventOnce('seeked', seeked);
};
- var seeked = function() {
+ var seeked = function()
+ {
waitForEvent('play', play);
video.play();
};
- var play = function() {
+ var play = function()
+ {
video.controller.playbackRate = 2;
- waitForEventOnce('timeupdate', timeupdate);
+ waitForEventOnce("playing", function()
+ {
+ waitForEventOnce("timeupdate", timeupdate);
+ });
};
- var timeupdate = function() {
+ var timeupdate = function()
+ {
testExpected('video.currentTime', 0, '!=');
endTest();
};

Powered by Google App Engine
This is Rietveld 408576698