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

Unified Diff: LayoutTests/media/video-controls-hide-on-move-outside-controls.html

Issue 297783004: Implement heuristic for showing media controls during playback w/o a mouse (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: IgnoreSelfHover -> IgnoreVideoHover; Tweak comment. Created 6 years, 7 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/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>

Powered by Google App Engine
This is Rietveld 408576698