| OLD | NEW |
| (Empty) | |
| 1 <script src="../../resources/testharness.js"></script> |
| 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', pointer_popu
p); |
| 11 function pointer_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 } |
| 28 } |
| 29 </script> |
| OLD | NEW |