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

Side by Side 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: 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 <script src="../../resources/testharness.js"></script>
mustaq 2016/10/07 19:06:21 Since LayoutTests/fast/events contains hundreds of
Navid Zolghadr 2016/10/11 13:19:26 Sure.
2 <script src="../../resources/testharnessreport.js"></script>
3 <p>
4 Test that only a single popup is allowed in response to a single
5 pointer up user action. The test passes if only one popup is created.
6 </p>
7 <button id="button">Tap Here</button>
8 <div id="console"></div>
9 <script>
10 document.getElementById('button').addEventListener('pointerup', popup);
11 function popup() {
12 assert_not_equals(window.open("about:blank", "window1"), null, "Popup di dn't open in pointerup handler.");
13 assert_equals(window.open("about:blank", "window2"), null, "Popup should open only once in pointerup handler.");
14 done();
15 }
16
17 if (window.testRunner) {
18 testRunner.setPopupBlockingEnabled(true);
19 testRunner.setCloseRemainingWindowsWhenComplete(true);
20
21 if (window.eventSender) {
22 var button = document.getElementById("button");
23 eventSender.addTouchPoint(button.offsetLeft + button.offsetWidth / 2 , button.offsetTop + button.offsetHeight / 2);
24 eventSender.touchStart();
25 eventSender.releaseTouchPoint(0);
26 eventSender.touchEnd();
27 }
Rick Byers 2016/10/11 15:08:50 nit: assert that the popup function was actually r
Navid Zolghadr 2016/10/12 15:18:01 It times out if that doesn't run. At least this is
28 }
29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698