| Index: LayoutTests/media/video-controls-touch-events-captured.html
|
| diff --git a/LayoutTests/media/video-controls-touch-events-captured.html b/LayoutTests/media/video-controls-touch-events-captured.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0cedc422591d24d6542ba99573b21a8ac51344a3
|
| --- /dev/null
|
| +++ b/LayoutTests/media/video-controls-touch-events-captured.html
|
| @@ -0,0 +1,60 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +
|
| +</head>
|
| +<body>
|
| + <video controls></video>
|
| + <p>This tests that touch events on the controls will not be seen by the video element.</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("touchstart");
|
| + waitForEventAndFail("touchend");
|
| + waitForEventAndFail("touchmove");
|
| +
|
| + waitForEventAndEnd("loadeddata", function()
|
| + {
|
| + if (window.eventSender) {
|
| + // click the play button
|
| + var coords = mediaControlsButtonCoordinates(video, "play-button");
|
| + eventSender.addTouchPoint(coords[0], coords[1]);
|
| +
|
| + eventSender.touchStart();
|
| + eventSender.leapForward(100);
|
| + eventSender.touchEnd();
|
| + eventSender.cancelTouchPoint(0);
|
| +
|
| + // Click the current time display, which should not respond to events, but
|
| + // should still capture them
|
| + coords = mediaControlsButtonCoordinates(video, "current-time-display");
|
| + eventSender.addTouchPoint(coords[0], coords[1]);
|
| +
|
| + eventSender.touchStart();
|
| + eventSender.leapForward(100);
|
| + eventSender.touchEnd();
|
| + eventSender.cancelTouchPoint(0);
|
| +
|
| +
|
| + // Click the timeline - this tests that multilevel shadow DOM elements work
|
| + coords = mediaControlsButtonCoordinates(video, "timeline");
|
| + eventSender.addTouchPoint(coords[0], coords[1]);
|
| +
|
| + eventSender.touchStart();
|
| + eventSender.leapForward(100);
|
| + eventSender.touchEnd();
|
| +
|
| + // Check that the timeline also captures moves
|
| + eventSender.updateTouchPoint(0, coords[0]+10, coords[1]+10)
|
| + eventSender.touchMove();
|
| + eventSender.cancelTouchPoint(0);
|
| +
|
| + }
|
| + });
|
| + video.src = findMediaFile("video", "content/test");
|
| + </script>
|
| +</body>
|
| +</html>
|
|
|