Index: LayoutTests/media/media-controller-playbackrate.html |
diff --git a/LayoutTests/media/media-controller-playbackrate.html b/LayoutTests/media/media-controller-playbackrate.html |
index e5a142b44a91494a8e26532d624c85a48e3cda43..e01f3420aa8b18e29cc1aa0e97d9bf179753d7c2 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() { |
+ 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. |
@@ -28,14 +30,19 @@ |
video.controller.defaultPlaybackRate = 0; |
waitForEvent('play', play); |
video.play(); |
+ }; |
+ |
+ var play = function() |
+ { |
+ video.controller.playbackRate = 2; |
+ waitForEventOnce("playing", function() |
+ { |
+ waitForEventOnce("timeupdate", timeupdate); |
+ }); |
}; |
- var play = function() { |
- video.controller.playbackRate = 2; |
- waitForEventOnce('timeupdate', timeupdate); |
- }; |
- |
- var timeupdate = function() { |
+ var timeupdate = function() |
+ { |
testExpected('video.currentTime', 0, '!='); |
endTest(); |
}; |