Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / touch / gesture / no-context-menu-on-long-tap-alone.html
blobecd8938e62b7b0029d30b71c4bb98523fd87c09d
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../../resources/js-test.js"></script>
5 </head>
6 <body onload="test()">
7 <p>This test checks that the context menu is not shown on long tap gesture without a long press.</p>
8 <div id="text">Testing</div>
9 <div id="result">PASS</div>
10 <script>
11 function test()
13 if (window.testRunner)
14 testRunner.dumpAsText();
16 document.oncontextmenu = function() { document.getElementById("result").innerHTML = "FAIL"; }
18 var text = document.getElementById("text");
20 var x = text.offsetParent.offsetLeft + text.offsetLeft + 4;
21 var y = text.offsetParent.offsetTop + text.offsetTop + text.offsetHeight / 2;
23 if (!window.eventSender)
24 return;
25 if (eventSender.gestureLongTap) {
26 eventSender.gestureLongTap(x, y);
27 } else {
28 debug("gestureLongTap not implemented by this platform");
29 return;
32 </script>
33 </body>
34 </html>