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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-controls-visibility-multimodal-mouse-after-touch.html

Issue 2431583004: Media Controls: don't activate buttons when tapping on hidden controls. (Closed)
Patch Set: review comments Created 4 years, 2 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 <title>Test video controls visibility with multimodal input. The controls should remain visible if the last input event was a mouse move over them.</title> 2 <title>Test video controls visibility with multimodal input. The controls should remain visible if the last input event was a mouse move over them.</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="media-file.js"></script> 5 <script src="media-file.js"></script>
6 <script src="media-controls.js"></script> 6 <script src="media-controls.js"></script>
7 <video controls loop></video> 7 <video controls loop></video>
8 <script> 8 <script>
9 async_test(function(t) { 9 async_test(function(t) {
10 var video = document.querySelector("video"); 10 var video = document.querySelector("video");
11 11
12 video.oncanplaythrough = t.step_func(function() { 12 video.oncanplaythrough = t.step_func(function() {
13 assert_true(video.paused); 13 assert_true(video.paused);
14 14
15 // Tap (touch input) the play button. 15 // Tap (touch input) the play button.
16 var coords = mediaControlsButtonCoordinates(video, "play-button"); 16 var coords = mediaControlsButtonCoordinates(video, "play-button");
17 eventSender.gestureTapDown(coords[0], coords[1]); 17 eventSender.gestureTapDown(coords[0], coords[1]);
18 eventSender.gestureShowPress(coords[0], coords[1]); 18 eventSender.gestureShowPress(coords[0], coords[1]);
19 eventSender.gestureTap(coords[0], coords[1]); 19 eventSender.gestureTap(coords[0], coords[1]);
20 assert_false(video.paused); 20 assert_false(video.paused);
21 21
22 // And then hover the control with the mouse. 22 // And then hover the control with the mouse.
23 eventSender.mouseMoveTo(0, 0);
23 eventSender.mouseMoveTo(coords[0], coords[1]); 24 eventSender.mouseMoveTo(coords[0], coords[1]);
24 25
25 // And the controls should remain visible. 26 // And the controls should remain visible.
26 runAfterHideMediaControlsTimerFired(t.step_func_done(function() { 27 runAfterHideMediaControlsTimerFired(t.step_func_done(function() {
27 var controls = mediaControlsButton(video, "panel"); 28 assert_true(isControlsPanelVisible(video));
28 assert_equals(getComputedStyle(controls).opacity, "1");
29 }), video); 29 }), video);
30 }); 30 });
31 31
32 video.src = findMediaFile("video", "content/test"); 32 video.src = findMediaFile("video", "content/test");
33 }); 33 });
34 </script> 34 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698