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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/popup-allowed-from-pointerup-exactly-once.html

Issue 2401643005: Create user gesture indicator for pointerup (Closed)
Patch Set: Move tests back to where they were before 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/PointerEventManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/events/popup-allowed-from-pointerup-exactly-once.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/popup-allowed-from-pointerup-exactly-once.html b/third_party/WebKit/LayoutTests/fast/events/popup-allowed-from-pointerup-exactly-once.html
new file mode 100644
index 0000000000000000000000000000000000000000..07db5fe2a8aa342e079ac0a2e1ce2fa84d2f3b25
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/popup-allowed-from-pointerup-exactly-once.html
@@ -0,0 +1,29 @@
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<p>
+ Test that only a single popup is allowed in response to a single
+ pointer up user action. The test passes if only one popup is created.
+</p>
+<button id="button">Tap Here</button>
+<div id="console"></div>
+<script>
+ document.getElementById('button').addEventListener('pointerup', pointer_popup);
+ function pointer_popup() {
+ assert_not_equals(window.open("about:blank", "window1"), null, "Popup didn't open in pointerup handler.");
+ assert_equals(window.open("about:blank", "window2"), null, "Popup should open only once in pointerup handler.");
+ done();
+ }
+
+ if (window.testRunner) {
+ testRunner.setPopupBlockingEnabled(true);
+ testRunner.setCloseRemainingWindowsWhenComplete(true);
+
+ if (window.eventSender) {
+ var button = document.getElementById("button");
+ eventSender.addTouchPoint(button.offsetLeft + button.offsetWidth / 2, button.offsetTop + button.offsetHeight / 2);
+ eventSender.touchStart();
+ eventSender.releaseTouchPoint(0);
+ eventSender.touchEnd();
+ }
+ }
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/PointerEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698