| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <body> | |
| 4 <p> | |
| 5 Test that a forwarded user gesture can be consumed by any timeout, | |
| 6 not just the first. | |
| 7 </p> | |
| 8 <button id="button" onclick="popup()">Click Here</button> | |
| 9 <div id="console"></div> | |
| 10 <script> | |
| 11 function timer1() { | |
| 12 } | |
| 13 function timer2() { | |
| 14 var win = window.open("about:blank", "window"); | |
| 15 if (!win) | |
| 16 document.getElementById("console").innerText = "FAILED"; | |
| 17 else | |
| 18 document.getElementById("console").innerText = "PASSED"; | |
| 19 if (window.testRunner) | |
| 20 testRunner.notifyDone(); | |
| 21 } | |
| 22 | |
| 23 function popup() { | |
| 24 setTimeout(timer1, 0); | |
| 25 setTimeout(timer2, 10); | |
| 26 } | |
| 27 | |
| 28 if (window.testRunner) { | |
| 29 testRunner.dumpAsText(); | |
| 30 testRunner.setCanOpenWindows(); | |
| 31 testRunner.setPopupBlockingEnabled(true); | |
| 32 testRunner.setCloseRemainingWindowsWhenComplete(true); | |
| 33 testRunner.waitUntilDone(); | |
| 34 | |
| 35 var button = document.getElementById("button"); | |
| 36 | |
| 37 if (window.eventSender) { | |
| 38 eventSender.mouseMoveTo(button.offsetLeft + button.offsetWid
th / 2, button.offsetTop + button.offsetHeight / 2); | |
| 39 eventSender.mouseDown(); | |
| 40 eventSender.mouseUp(); | |
| 41 } | |
| 42 } | |
| 43 </script> | |
| 44 </body> | |
| 45 </html> | |
| OLD | NEW |