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

Side by Side Diff: LayoutTests/media/video-controls-always-visible-when-control-hovered.html

Issue 441193003: Hide video controls after touch when hideMediaControlsTimerFired fires. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: /s/TODO/FIXME 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>
(...skipping 11 matching lines...) Expand all
22 22
23 // Click the play button. 23 // Click the play button.
24 var playCoords = mediaControlsButtonCoordinates(video, "play-button"); 24 var playCoords = mediaControlsButtonCoordinates(video, "play-button");
25 var clickX = playCoords[0]; 25 var clickX = playCoords[0];
26 var clickY = playCoords[1]; 26 var clickY = playCoords[1];
27 eventSender.mouseMoveTo(clickX, clickY); 27 eventSender.mouseMoveTo(clickX, clickY);
28 eventSender.mouseDown(); 28 eventSender.mouseDown();
29 eventSender.mouseUp(); 29 eventSender.mouseUp();
30 testExpected("video.paused", false); 30 testExpected("video.paused", false);
31 31
32 runAfterControlsHidden(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", 1);
36 36
37 consoleWrite(""); 37 consoleWrite("");
38 endTest(); 38 endTest();
39 }, video); 39 }, video);
40
41 // Move the mouse to the upper-left corner of the video.
42 eventSender.mouseMoveTo(video.offsetLeft + 4, video.offsetTop + 4);
43 } 40 }
44 </script> 41 </script>
45 <body> 42 <body>
46 <p>Test video element control visibility when mouse is not over element.</p> 43 <p>Test video element control visibility after click on control. After the c lick
44 the mouse does not move, so the control is still hovered and it should
45 remain visible.</p>
47 <p>This test only runs in DRT!</p> 46 <p>This test only runs in DRT!</p>
48 47
49 <video id="no-video-media" controls loop oncanplaythrough="runTest()"></vide o> 48 <video id="no-video-media" controls loop oncanplaythrough="runTest()"></vide o>
50 <script> 49 <script>
51 setSrcById("no-video-media", findMediaFile("video", "content/test")); 50 setSrcById("no-video-media", findMediaFile("video", "content/test"));
52 </script> 51 </script>
53 </body> 52 </body>
54 </html> 53 </html>
OLDNEW
« no previous file with comments | « LayoutTests/media/media-controls.js ('k') | LayoutTests/media/video-controls-always-visible-when-control-hovered-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698