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

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: cl format 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 eventSender.gestureTapDown(coords[0], coords[1]);
20 eventSender.gestureShowPress(coords[0], coords[1]);
21 eventSender.gestureTap(coords[0], coords[1]);
Zhiqiang Zhang (Slow) 2016/10/19 10:02:04 nit: maybe do the asserts after each gesture?
mlamouri (slow - plz ping) 2016/10/20 10:32:06 Done.
22
23 // Tap shows the controls and do not pause.
24 assert_false(video.paused);
25 assert_true(isControlsPanelVisible(video));
26 }), video);
27 });
28 });
29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698