[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.22
[framework/web/webkit-efl.git] / LayoutTests / fast / events / context-no-deselect.html
1 <html>
2 <body>
3 <input type="text" id="text" value="some sample text">
4 </body>
5 </html>
6
7 <script>
8 // This test checks that if the user right clicks on selected text,
9 // the selected text doesn't change or get deselected.
10 var input = document.getElementById("text");
11 input.selectionStart = 5;
12 input.selectionEnd = 15;
13
14 if (window.layoutTestController) {
15     var x, y;
16     x = input.offsetParent.offsetLeft + input.offsetLeft + input.offsetWidth / 2;
17     y = input.offsetParent.offsetTop + input.offsetTop + input.offsetHeight / 2;
18     eventSender.mouseMoveTo(x, y);
19     eventSender.contextClick();
20 }
21
22 </script>