Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: LayoutTests/media/video-controls-hide-after-touch-on-control.html

Issue 453493002: Improve detection of touch events when hiding media controls. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@autoHideControls
Patch Set: Added multimodal tests and NotFromInput synthetic type. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 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]);
Rick Byers 2014/08/22 18:11:13 for maximum fidelity with how touch actually behav
Ignacio Solla 2014/08/26 13:40:53 Done.
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
32 runAfterHideMediaControlsTimerFired(function() 28 runAfterHideMediaControlsTimerFired(function()
33 { 29 {
34 controls = mediaControlsButton(video, "panel"); 30 controls = mediaControlsButton(video, "panel");
35 testExpected("getComputedStyle(controls).opacity", 0); 31 testExpected("getComputedStyle(controls).opacity", 0);
36 32
37 consoleWrite(""); 33 consoleWrite("");
38 endTest(); 34 endTest();
39 }, video); 35 }, video);
40 } 36 }
41 </script> 37 </script>
42 <body> 38 <body>
43 <p>Test video element control visibility after touch on control. After a del ay the 39 <p>Test video element control visibility after touch on control. After a del ay the
44 controls must be hidden.</p> 40 controls must be hidden.</p>
45 <p>This test only runs in DRT!</p> 41 <p>This test only runs in DRT!</p>
46 42
47 <video id="no-video-media" controls loop oncanplaythrough="runTest()"></vide o> 43 <video id="no-video-media" controls loop oncanplaythrough="runTest()"></vide o>
48 <script> 44 <script>
49 window.internals.settings.setDeviceSupportsMouse(false);
50 setSrcById("no-video-media", findMediaFile("video", "content/test")); 45 setSrcById("no-video-media", findMediaFile("video", "content/test"));
51 </script> 46 </script>
52 </body> 47 </body>
53 </html> 48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698