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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/media/media-controls-tap-show-controls-without-activating.html
diff --git a/third_party/WebKit/LayoutTests/media/media-controls-tap-show-controls-without-activating.html b/third_party/WebKit/LayoutTests/media/media-controls-tap-show-controls-without-activating.html
new file mode 100644
index 0000000000000000000000000000000000000000..2945e81ca44c930d7cab21f5808ae278f8458ca5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/media-controls-tap-show-controls-without-activating.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>Test that when tapping on the controls to show them it does not activate the button below.</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="media-file.js"></script>
+<script src="media-controls.js"></script>
+<video controls loop></video>
+<script>
+async_test(function(t) {
+ var video = document.querySelector("video");
+ video.src = findMediaFile("video", "content/test");
+ video.play();
+
+ video.onplaying = t.step_func(function() {
+ runAfterHideMediaControlsTimerFired(t.step_func_done(function() {
+ assert_false(isControlsPanelVisible(video));
+
+ var coords = mediaControlsButtonCoordinates(video, "play-button");
+ eventSender.gestureTapDown(coords[0], coords[1]);
+ eventSender.gestureShowPress(coords[0], coords[1]);
+ 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.
+
+ // Tap shows the controls and do not pause.
+ assert_false(video.paused);
+ assert_true(isControlsPanelVisible(video));
+ }), video);
+ });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698