Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / context-menu-on-text.html
blob1d0a625bef704d0ebf5c63d4d95eaa15311a9438
1 <body onload="test()">
2 <p>This test checks that the context menu is shown over a simple non-editable text.</p>
3 <div id="text">Lorem ipsum</div>
4 <div id="result">FAIL</div>
5 </body>
6 <script>
7 function test()
9 if (window.testRunner)
10 testRunner.dumpAsText();
12 var text = document.getElementById("text");
14 var x = text.offsetParent.offsetLeft + text.offsetLeft + 4;
15 var y = text.offsetParent.offsetTop + text.offsetTop + text.offsetHeight / 2;
17 if (!window.eventSender)
18 return;
20 eventSender.mouseMoveTo(x, y);
22 var items = eventSender.contextClick();
24 if (items.length > 0)
25 document.getElementById('result').innerHTML = 'SUCCESS';
26 else
27 document.getElementById('result').innerHTML = 'FAILURE: No context menu';
29 </script>