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/video-controls-auto-hide-after-play-by-touch.html

Issue 892963003: Ensure media control goes to transparent(hide) after seek by touch (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/media/video-controls-auto-hide-after-play-by-touch-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/video-controls-auto-hide-after-play-by-touch.html
diff --git a/LayoutTests/media/video-controls-hide-on-move-outside-controls.html b/LayoutTests/media/video-controls-auto-hide-after-play-by-touch.html
similarity index 66%
copy from LayoutTests/media/video-controls-hide-on-move-outside-controls.html
copy to LayoutTests/media/video-controls-auto-hide-after-play-by-touch.html
index 1e0cff1047982bb2d68428e4e74e9ea03792af11..935660c2c43801ce66361c276998224c9f2793a3 100644
--- a/LayoutTests/media/video-controls-hide-on-move-outside-controls.html
+++ b/LayoutTests/media/video-controls-auto-hide-after-play-by-touch.html
@@ -10,11 +10,21 @@
<script src=media-file.js></script>
<script src=media-controls.js></script>
<script>
+
var controls;
+function dispatchActivateEvent(target) {
+ // Create a DOMActivate event and dispatch it
+ var event = document.createEvent('UIEvents');
+ event.initUIEvent('DOMActivate', true, true, window, 1)
+ target.dispatchEvent(event);
+}
+
+
function runTest()
{
video = document.getElementById("no-video-media");
+ controls = mediaControlsButton(video, "panel");
testExpected("video.paused", true);
if (!window.testRunner)
@@ -24,26 +34,23 @@ function runTest()
var playCoords = mediaControlsButtonCoordinates(video, "play-button");
var clickX = playCoords[0];
var clickY = playCoords[1];
- eventSender.mouseMoveTo(clickX, clickY);
- eventSender.mouseDown();
- eventSender.mouseUp();
+ eventSender.gestureTap(clickX, clickY);
+ eventSender.gestureTapDown(clickX, clickY);
+ dispatchActivateEvent(controls);
+
testExpected("video.paused", false);
runAfterHideMediaControlsTimerFired(function()
{
- controls = mediaControlsButton(video, "panel");
testExpected("getComputedStyle(controls).opacity", 0);
consoleWrite("");
endTest();
}, video);
-
- // 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>Test video control element visibility when play by touch.</p>
<p>This test only runs in DRT!</p>
<video id="no-video-media" controls loop oncanplaythrough="runTest()"></video>
« no previous file with comments | « no previous file | LayoutTests/media/video-controls-auto-hide-after-play-by-touch-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698