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

Side by Side Diff: LayoutTests/media/video-controls-touch-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, 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4
5 </head>
6 <body>
7 <video controls></video>
8 <p>This tests that touch events on the controls will not be seen by the vide o element.</p>
9 <script src=media-file.js></script>
10 <script src=video-test.js></script>
11 <script src=media-controls.js></script>
12 <script>
13 waitForEventAndFail("click");
14 waitForEventAndFail("dblclick");
15 waitForEventAndFail("touchstart");
16 waitForEventAndFail("touchend");
17 waitForEventAndFail("touchmove");
18
19 waitForEventAndEnd("loadeddata", function()
20 {
21 if (window.eventSender) {
22 // click the play button
23 var coords = mediaControlsButtonCoordinates(video, "play-button" );
24 eventSender.addTouchPoint(coords[0], coords[1]);
25
26 eventSender.touchStart();
27 eventSender.leapForward(100);
28 eventSender.touchEnd();
29 eventSender.cancelTouchPoint(0);
30
31 // Click the current time display, which should not respond to e vents, but
32 // should still capture them
33 coords = mediaControlsButtonCoordinates(video, "current-time-dis play");
34 eventSender.addTouchPoint(coords[0], coords[1]);
35
36 eventSender.touchStart();
37 eventSender.leapForward(100);
38 eventSender.touchEnd();
39 eventSender.cancelTouchPoint(0);
40
41
42 // Click the timeline - this tests that multilevel shadow DOM el ements work
43 coords = mediaControlsButtonCoordinates(video, "timeline");
44 eventSender.addTouchPoint(coords[0], coords[1]);
45
46 eventSender.touchStart();
47 eventSender.leapForward(100);
48 eventSender.touchEnd();
49
50 // Check that the timeline also captures moves
51 eventSender.updateTouchPoint(0, coords[0]+10, coords[1]+10)
52 eventSender.touchMove();
53 eventSender.cancelTouchPoint(0);
54
55 }
56 });
57 video.src = findMediaFile("video", "content/test");
58 </script>
59 </body>
60 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698