Index: LayoutTests/media/video-controls-focus-movement-on-hide.html |
diff --git a/LayoutTests/media/video-controls-focus-movement-on-hide.html b/LayoutTests/media/video-controls-focus-movement-on-hide.html |
index bd378a350f18923dac64305f28cb49e52fb14563..38d37d4f42894d3dd0648a4ca30d95ce87be0d1b 100644 |
--- a/LayoutTests/media/video-controls-focus-movement-on-hide.html |
+++ b/LayoutTests/media/video-controls-focus-movement-on-hide.html |
@@ -20,20 +20,17 @@ video.addEventListener("canplay", function() |
playButton.click(); |
testExpected("document.activeElement", video); |
-}); |
-video.addEventListener("timeupdate", function(event) |
-{ |
- var video = event.target; |
- if (video.currentTime < 4) |
- return; |
- controls = mediaControlsButton(video, "panel"); |
- testExpected("getComputedStyle(controls).opacity", 0); |
+ runAfterControlsHidden(function() |
+ { |
+ controls = mediaControlsButton(video, "panel"); |
+ testExpected("getComputedStyle(controls).opacity", 0); |
- testExpected("document.activeElement", document.body); |
+ testExpected("document.activeElement", document.body); |
- consoleWrite(""); |
- endTest(); |
+ consoleWrite(""); |
+ endTest(); |
+ }, video); |
}); |
</script> |