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

Unified Diff: LayoutTests/media/video-controls-mouse-events-captured.html

Issue 406213002: If the media controls are visible they should always grab clicks (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix layout test - was hitting overlay play button. Created 6 years, 5 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-mouse-events-captured-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/video-controls-mouse-events-captured.html
diff --git a/LayoutTests/media/video-controls-mouse-events-captured.html b/LayoutTests/media/video-controls-mouse-events-captured.html
new file mode 100644
index 0000000000000000000000000000000000000000..215a8a5a302e9e64a3868d6b936dbefa362c51aa
--- /dev/null
+++ b/LayoutTests/media/video-controls-mouse-events-captured.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+<head>
+
+</head>
+<body>
+ <video controls></video>
+ <p>This tests that a mouse events on the controls will not be seen by the video element.</p>
+ <p>Also tests keyboard input.</p>
+ <script src=media-file.js></script>
+ <script src=video-test.js></script>
+ <script src=media-controls.js></script>
+ <script>
+ waitForEventAndFail("click");
+ waitForEventAndFail("dblclick");
+ waitForEventAndFail("mousedown");
+ waitForEventAndFail("mouseup");
+ waitForEventAndFail("keydown");
+
+ waitForEventAndEnd("loadeddata", function()
+ {
+ if (window.eventSender) {
+ // click the play button
+ var coords = mediaControlsButtonCoordinates(video, "play-button");
+ eventSender.mouseMoveTo(coords[0], coords[1]);
+
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ eventSender.keyDown('A');
+
+ // Click the current time display, which should not respond to events, but
+ // should still capture them
+ coords = mediaControlsButtonCoordinates(video, "current-time-display");
+ eventSender.mouseMoveTo(coords[0], coords[1]);
+
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ eventSender.keyDown('A');
+
+ // Click the timeline - this tests that multilevel shadow DOM elements work
+ coords = mediaControlsButtonCoordinates(video, "timeline");
+ eventSender.mouseMoveTo(coords[0], coords[1]);
+
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ eventSender.keyDown('A');
+
+ waitForEventAndFail("mousemove")
+
+ // Check that the timeline also captures mousemove
+ eventSender.mouseMoveTo(coords[0]+10, coords[1]+10)
+ }
+ });
+ video.src = findMediaFile("video", "content/test");
+ </script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/media/video-controls-mouse-events-captured-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698