7 <video controls
></video>
8 <p>This tests that a mouse events on the controls will not be seen by the video element.
</p>
9 <p>Also tests keyboard input.
</p>
10 <script src=media-file.js
></script>
11 <script src=video-test.js
></script>
12 <script src=media-controls.js
></script>
14 waitForEventAndFail("click");
15 waitForEventAndFail("dblclick");
16 waitForEventAndFail("mousedown");
17 waitForEventAndFail("mouseup");
18 waitForEventAndFail("keydown");
20 waitForEventAndEnd("loadeddata", function()
22 if (window
.eventSender
) {
23 // click the play button
24 var coords
= mediaControlsButtonCoordinates(video
, "play-button");
25 eventSender
.mouseMoveTo(coords
[0], coords
[1]);
27 eventSender
.mouseDown();
28 eventSender
.mouseUp();
29 eventSender
.keyDown('A');
31 // Click the current time display, which should not respond to events, but
32 // should still capture them
33 coords
= mediaControlsButtonCoordinates(video
, "current-time-display");
34 eventSender
.mouseMoveTo(coords
[0], coords
[1]);
36 eventSender
.mouseDown();
37 eventSender
.mouseUp();
38 eventSender
.keyDown('A');
40 // Click the timeline - this tests that multilevel shadow DOM elements work
41 coords
= mediaControlsButtonCoordinates(video
, "timeline");
42 eventSender
.mouseMoveTo(coords
[0], coords
[1]);
44 eventSender
.mouseDown();
45 eventSender
.mouseUp();
46 eventSender
.keyDown('A');
48 // If we're not dragging, then we should get a mousemove.
49 waitForEventOnce("mousemove");
50 eventSender
.mouseMoveTo(coords
[0]+10, coords
[1]+10);
51 // Expect another as we move back to the slider.
52 waitForEventOnce("mousemove");
53 eventSender
.mouseMoveTo(coords
[0], coords
[1]);
55 // The above positioned the slider under the mouse. Click
57 eventSender
.mouseDown();
59 waitForEventAndFail("mousemove")
61 // Check that the timeline also captures mousemove if the
62 // slider is being dragged.
63 eventSender
.mouseMoveTo(coords
[0]+10, coords
[1]+10)
66 video
.src
= findMediaFile("video", "content/test");