Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / dispatch-synthetic-mouseevent.html
bloba414a154bfab9719a2e18806e88cffb3e5af98d8
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id='top'>
9 </div>
10 <pre id="console"></pre>
11 <script>
12 description("Tests to ensure that dblclick event is not fired.");
14 function clickHandler(event)
16 debug('click event is fired.');
19 function dblclickHandler(event)
21 testFailed('dblclick event should not be fired.');
24 function test()
26 if (window.testRunner)
27 testRunner.dumpAsText();
29 var node = document.getElementById('top');
30 node.addEventListener('click', clickHandler, false);
31 node.addEventListener('dblclick', dblclickHandler, false);
33 var event = document.createEvent("MouseEvents");
34 var details = 2;
35 event.initMouseEvent("click", true, false, window,
36 details, 10, 10, 10, 10, false, false, false, false, 0, null);
37 node.dispatchEvent(event);
40 test();
41 </script>
42 </body>
43 </html>