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

Side by Side Diff: third_party/WebKit/LayoutTests/media/media-controls-tap-show-controls-without-activating.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
(Empty)
1 <!DOCTYPE html>
2 <title>Test that when tapping on the controls to show them it does not activate the button below.</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="media-file.js"></script>
6 <script src="media-controls.js"></script>
7 <video controls loop></video>
8 <script>
9 async_test(function(t) {
10 var video = document.querySelector("video");
11 video.src = findMediaFile("video", "content/test");
12 video.play();
13
14 video.onplaying = t.step_func(function() {
15 runAfterHideMediaControlsTimerFired(t.step_func_done(function() {
16 assert_false(isControlsPanelVisible(video));
17
18 var coords = mediaControlsButtonCoordinates(video, "play-button");
19
20 eventSender.gestureTapDown(coords[0], coords[1]);
21 assert_false(video.paused);
22 assert_false(isControlsPanelVisible(video));
23
24 eventSender.gestureShowPress(coords[0], coords[1]);
25 assert_false(video.paused);
26 assert_false(isControlsPanelVisible(video));
27
28 eventSender.gestureTap(coords[0], coords[1]);
29 // Tap shows the controls and do not pause.
30 assert_false(video.paused);
31 assert_true(isControlsPanelVisible(video));
32 }), video);
33 });
34 });
35 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698