9 <script src=video-test.js
></script>
10 <script src=media-file.js
></script>
11 <script src=media-controls.js
></script>
17 video
= document
.getElementById("no-video-media");
19 testExpected("video.paused", true);
20 if (!window
.testRunner
)
23 if (!window
.internals
|| !window
.internals
.setIsCursorVisible
) {
24 debug("window.internals.setIsCursorVisible is required to run this test.");
28 // Hover the control with the mouse.
29 var coords
= mediaControlsButtonCoordinates(video
, "play-button");
30 eventSender
.mouseMoveTo(coords
[0], coords
[1]);
32 // And then tap (touch input) the play button.
33 eventSender
.gestureTapDown(coords
[0], coords
[1]);
34 eventSender
.gestureShowPress(coords
[0], coords
[1]);
35 eventSender
.gestureTap(coords
[0], coords
[1]);
36 testExpected("video.paused", false);
38 // In the real world Chromium hides the cursor after a tap,
39 // so hide it manually here. This is required to hit the
40 // early out from EventHandler::fakeMouseMoveEventTimerFired when
41 // isCursorVisible is false.
42 internals
.setIsCursorVisible(document
, false);
44 // And the controls should hide after a timeout.
45 runAfterHideMediaControlsTimerFired(function()
47 controls
= mediaControlsButton(video
, "panel");
48 testExpected("getComputedStyle(controls).opacity", 0);
55 <p>Test video element control visibility with multimodal input. The controls
56 should hide after a timeout if the last input event was a tap.
</p>
57 <p>This test only runs in DRT!
</p>
59 <video id=
"no-video-media" controls loop
oncanplaythrough=
"runTest()"></video>
61 setSrcById("no-video-media", findMediaFile("video", "content/test"));