OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <style> | 3 <style> |
4 #no-video-media { | 4 #no-video-media { |
5 width: 320px; | 5 width: 320px; |
6 height: 240px; | 6 height: 240px; |
7 } | 7 } |
8 </style> | 8 </style> |
9 <script src=video-test.js></script> | 9 <script src=video-test.js></script> |
10 <script src=media-file.js></script> | 10 <script src=media-file.js></script> |
11 <script src=media-controls.js></script> | 11 <script src=media-controls.js></script> |
12 <script> | 12 <script> |
13 var controls; | 13 var controls; |
14 | 14 |
15 function runTest() | 15 function runTest() |
16 { | 16 { |
17 video = document.getElementById("no-video-media"); | 17 video = document.getElementById("no-video-media"); |
18 | 18 |
19 testExpected("video.paused", true); | 19 testExpected("video.paused", true); |
20 if (!window.testRunner) | 20 if (!window.testRunner) |
21 return; | 21 return; |
22 | 22 |
23 // Click the play button. | 23 // Tap (touch input) the play button. |
24 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); | 24 var coords = mediaControlsButtonCoordinates(video, "play-button"); |
25 var clickX = playCoords[0]; | 25 eventSender.gestureTap(coords[0], coords[1]); |
26 var clickY = playCoords[1]; | |
27 eventSender.mouseMoveTo(clickX, clickY); | |
28 eventSender.mouseDown(); | |
29 eventSender.mouseUp(); | |
30 testExpected("video.paused", false); | 26 testExpected("video.paused", false); |
31 | 27 |
| 28 // And then hover the control with the mouse. |
| 29 eventSender.mouseMoveTo(coords[0], coords[1]); |
| 30 |
| 31 // And the controls should remain visible. |
32 runAfterHideMediaControlsTimerFired(function() | 32 runAfterHideMediaControlsTimerFired(function() |
33 { | 33 { |
34 controls = mediaControlsButton(video, "panel"); | 34 controls = mediaControlsButton(video, "panel"); |
35 testExpected("getComputedStyle(controls).opacity", 1); | 35 testExpected("getComputedStyle(controls).opacity", 1); |
36 | |
37 consoleWrite(""); | |
38 endTest(); | 36 endTest(); |
39 }, video); | 37 }, video); |
40 } | 38 } |
41 </script> | 39 </script> |
42 <body> | 40 <body> |
43 <p>Test video element control visibility after click on control. After the c
lick | 41 <p>Test video element control visibility with multimodal input. The controls |
44 the mouse does not move, so the control is still hovered and it should | 42 should remain visible if the last input event was a mouse move over them.
</p> |
45 remain visible.</p> | |
46 <p>This test only runs in DRT!</p> | 43 <p>This test only runs in DRT!</p> |
47 | 44 |
48 <video id="no-video-media" controls loop oncanplaythrough="runTest()"></vide
o> | 45 <video id="no-video-media" controls loop oncanplaythrough="runTest()"></vide
o> |
49 <script> | 46 <script> |
50 setSrcById("no-video-media", findMediaFile("video", "content/test")); | 47 setSrcById("no-video-media", findMediaFile("video", "content/test")); |
51 </script> | 48 </script> |
52 </body> | 49 </body> |
53 </html> | 50 </html> |
OLD | NEW |