Disable WebXR tests on Windows
[WebKit-https.git] / LayoutTests / plugins / mouse-events.html
1 <html>
2 <head>
3 <script src="../resources/js-test-pre.js"></script>
4 </script>
5 </head>
6 <body>
7 <embed name="plg" type="application/x-webkit-test-netscape" windowedPlugin="false" width=100 height=100></embed>
8 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=11517">bug 11517</a>:
9 Flash clicks/interactivity not working properly.</p>
10 <div id=console></div>
11 <script>
12     window.jsTestIsAsync = true;
13
14     plg.windowedPlugin = false;
15     plg.eventLoggingEnabled = true;
16
17     // Our test plug-in logs events through window.console. Override it with a custom
18     // implementation that counts the number of messages - due to the nature of IPC, it's
19     // difficult to predict when events get handled.
20     const expectedMessageCount = 5;
21     var messageCount = 0;
22     window.console = {
23         log: function(message) {
24             if (messageCount == expectedMessageCount) {
25                 alert("Message unexpectedly leaked from preceding test, plugins/mouse-events.html: " + message);
26                 return;
27             }
28
29             debug(message);
30
31             if (++messageCount == expectedMessageCount)
32                 finishJSTest();
33         }
34     };
35
36     if (!window.testRunner) {
37         document.write("To test manually, please install WebKit test plug-in, and verify that mouse events get logged.");
38     } else {
39         eventSender.mouseMoveTo(0,0);
40         eventSender.mouseMoveTo(20,20);
41         eventSender.mouseDown();
42         eventSender.mouseUp();
43         eventSender.mouseMoveTo(30,30);
44         eventSender.mouseDown();
45         eventSender.mouseMoveTo(40,30);
46         eventSender.mouseUp();
47         eventSender.mouseMoveTo(0,0);
48     }
49 </script>
50 <script src="../resources/js-test-post.js"></script>
51 </body>
52 </html>