Index: LayoutTests/media/video-controls-hide-on-move-outside-controls.html |
diff --git a/LayoutTests/media/video-controls-hide-on-move-outside-controls.html b/LayoutTests/media/video-controls-hide-on-move-outside-controls.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ddea8decb1701046a0f9fc488ae7e5e62bc5d7ef |
--- /dev/null |
+++ b/LayoutTests/media/video-controls-hide-on-move-outside-controls.html |
@@ -0,0 +1,55 @@ |
+<!DOCTYPE html> |
+<html> |
+<style> |
+#no-video-media { |
+ width: 320px; |
+ height: 240px; |
+} |
+</style> |
+<script src=video-test.js></script> |
+<script src=media-file.js></script> |
+<script src=media-controls.js></script> |
+<script> |
+var controls; |
+ |
+function runTest() |
+{ |
+ video = document.getElementById("no-video-media"); |
+ video.addEventListener("timeupdate", function() |
+ { |
+ if (video.currentTime < 4) |
acolwell GONE FROM CHROMIUM
2014/05/23 18:26:28
ditto. Actually, I wonder if we should put this fu
|
+ return; |
+ controls = mediaControlsButton(video, "panel"); |
+ testExpected("getComputedStyle(controls).opacity", 0); |
+ |
+ consoleWrite(""); |
+ endTest(); |
+ }); |
+ |
+ testExpected("video.paused", true); |
+ if (!window.testRunner) |
+ return; |
+ |
+ // Click the play button. |
+ var playCoords = mediaControlsButtonCoordinates(video, "play-button"); |
+ var clickX = playCoords[0]; |
+ var clickY = playCoords[1]; |
+ eventSender.mouseMoveTo(clickX, clickY); |
+ eventSender.mouseDown(); |
+ eventSender.mouseUp(); |
+ testExpected("video.paused", false); |
+ |
+ // Move the mouse to the upper-left corner of the video. |
+ eventSender.mouseMoveTo(video.offsetLeft + 4, video.offsetTop + 4); |
+} |
+</script> |
+<body> |
+ <p>Test video element control visibility when mouse is not over element.</p> |
+ <p>This test only runs in DRT!</p> |
+ |
+ <video id="no-video-media" controls loop oncanplaythrough="runTest()"></video> |
+ <script> |
+ setSrcById("no-video-media", findMediaFile("video", "content/test")); |
+ </script> |
+</body> |
+</html> |