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

Unified Diff: LayoutTests/media/video-controls-visibility-multimodal-touch-after-mouse.html

Issue 453493002: Improve detection of touch events when hiding media controls. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@autoHideControls
Patch Set: Added multimodal tests and NotFromInput synthetic type. Created 6 years, 4 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-visibility-multimodal-touch-after-mouse.html
diff --git a/LayoutTests/media/video-controls-hide-after-touch-on-control.html b/LayoutTests/media/video-controls-visibility-multimodal-touch-after-mouse.html
similarity index 65%
copy from LayoutTests/media/video-controls-hide-after-touch-on-control.html
copy to LayoutTests/media/video-controls-visibility-multimodal-touch-after-mouse.html
index 7715602593f57267742396af3b1e56fa46035fd3..fc625eb0099b08ff89a8cde653c67f43ed9e5f76 100644
--- a/LayoutTests/media/video-controls-hide-after-touch-on-control.html
+++ b/LayoutTests/media/video-controls-visibility-multimodal-touch-after-mouse.html
@@ -20,33 +20,31 @@ function runTest()
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();
+ // Hover the control with the mouse.
+ var coords = mediaControlsButtonCoordinates(video, "play-button");
+ eventSender.mouseMoveTo(coords[0], coords[1]);
+
+ // And then tap (touch input) the play button.
+ eventSender.gestureTap(coords[0], coords[1]);
testExpected("video.paused", false);
+ // And the controls should hide after a timeout.
Ignacio Solla 2014/08/21 17:42:31 BTW, this is the test that failed before I added N
Rick Byers 2014/08/22 18:11:13 Nice, good catch! Do you really never want to con
Ignacio Solla 2014/08/26 13:40:53 Done. I have added the internals.setCursorVisible
Ignacio Solla 2014/08/26 13:40:53 Acknowledged.
Rick Byers 2014/08/26 15:25:46 Yeah, LayoutTests are really designed just test bl
Ignacio Solla 2014/08/26 17:30:42 I had manually tested with Android and a keyboard,
runAfterHideMediaControlsTimerFired(function()
{
controls = mediaControlsButton(video, "panel");
testExpected("getComputedStyle(controls).opacity", 0);
-
- consoleWrite("");
endTest();
}, video);
+
}
</script>
<body>
- <p>Test video element control visibility after touch on control. After a delay the
- controls must be hidden.</p>
+ <p>Test video element control visibility with multimodal input. The controls
+ should hide after a timeout if the last input event was a tap.</p>
<p>This test only runs in DRT!</p>
<video id="no-video-media" controls loop oncanplaythrough="runTest()"></video>
<script>
- window.internals.settings.setDeviceSupportsMouse(false);
setSrcById("no-video-media", findMediaFile("video", "content/test"));
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698