Chromium Code Reviews| 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 // Hover the control with the mouse. |
| 24 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); | 24 var coords = mediaControlsButtonCoordinates(video, "play-button"); |
| 25 var clickX = playCoords[0]; | 25 eventSender.mouseMoveTo(coords[0], coords[1]); |
| 26 var clickY = playCoords[1]; | 26 |
| 27 eventSender.mouseMoveTo(clickX, clickY); | 27 // And then tap (touch input) the play button. |
| 28 eventSender.mouseDown(); | 28 eventSender.gestureTap(coords[0], coords[1]); |
| 29 eventSender.mouseUp(); | |
| 30 testExpected("video.paused", false); | 29 testExpected("video.paused", false); |
| 31 | 30 |
| 31 // And the controls should hide after a timeout. | |
|
Ignacio Solla
2014/08/21 17:42:31
BTW, this is the test that failed before I added N
Rick Byers
2014/08/22 18:11:13
Nice, good catch!
Do you really never want to con
Ignacio Solla
2014/08/26 13:40:53
Done.
I have added the internals.setCursorVisible
Ignacio Solla
2014/08/26 13:40:53
Acknowledged.
Rick Byers
2014/08/26 15:25:46
Yeah, LayoutTests are really designed just test bl
Ignacio Solla
2014/08/26 17:30:42
I had manually tested with Android and a keyboard,
| |
| 32 runAfterHideMediaControlsTimerFired(function() | 32 runAfterHideMediaControlsTimerFired(function() |
| 33 { | 33 { |
| 34 controls = mediaControlsButton(video, "panel"); | 34 controls = mediaControlsButton(video, "panel"); |
| 35 testExpected("getComputedStyle(controls).opacity", 0); | 35 testExpected("getComputedStyle(controls).opacity", 0); |
| 36 | |
| 37 consoleWrite(""); | |
| 38 endTest(); | 36 endTest(); |
| 39 }, video); | 37 }, video); |
| 38 | |
| 40 } | 39 } |
| 41 </script> | 40 </script> |
| 42 <body> | 41 <body> |
| 43 <p>Test video element control visibility after touch on control. After a del ay the | 42 <p>Test video element control visibility with multimodal input. The controls |
| 44 controls must be hidden.</p> | 43 should hide after a timeout if the last input event was a tap.</p> |
| 45 <p>This test only runs in DRT!</p> | 44 <p>This test only runs in DRT!</p> |
| 46 | 45 |
| 47 <video id="no-video-media" controls loop oncanplaythrough="runTest()"></vide o> | 46 <video id="no-video-media" controls loop oncanplaythrough="runTest()"></vide o> |
| 48 <script> | 47 <script> |
| 49 window.internals.settings.setDeviceSupportsMouse(false); | |
| 50 setSrcById("no-video-media", findMediaFile("video", "content/test")); | 48 setSrcById("no-video-media", findMediaFile("video", "content/test")); |
| 51 </script> | 49 </script> |
| 52 </body> | 50 </body> |
| 53 </html> | 51 </html> |
| OLD | NEW |