[Clipboard API] Support navigator.clipboard.read()
[WebKit-https.git] / LayoutTests / fast / events / popup-blocked-from-mousemove.html
1 <html>
2 <head>
3 <script>
4 if (window.testRunner) {
5     testRunner.dumpAsText();
6     testRunner.setCanOpenWindows();
7     testRunner.setPopupBlockingEnabled(true);
8     testRunner.setCloseRemainingWindowsWhenComplete(true);
9     testRunner.waitUntilDone();
10     // Record current window count.
11     window.windowCount = window.testRunner.windowCount();
12 }
13
14 function eventfire()
15 {
16        oClickEvent = document.createEvent("MouseEvents");
17        oClickEvent.initEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
18        document.body.dispatchEvent(oClickEvent);
19 }
20
21 window.onload = function() {
22     if (!window.eventSender)
23         return;
24
25     eventSender.mouseMoveTo(50, 50);
26     eventSender.mouseMoveTo(0, 0);
27     
28     function finishTest()
29     {
30         if (testRunner.windowCount() == window.windowCount)
31             document.getElementById("console").innerText = "PASSED";
32         else
33             document.getElementById("console").innerText = "FAILED";
34         testRunner.notifyDone();
35     }
36     setTimeout(finishTest, 0);
37 }
38 </script>
39 </head>
40 <body onMouseOver=eventfire() onMouseOut=eventfire() onclick="window.open('about:blank','','height=200,width=200')">
41 If you observe a popup this test has failed due to a MouseMovement being treated as a user gesture by the popup blocker.
42 <div id="console" style='height: 200; width: 200'></div>
43 </body>
44 </html>
45