Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/context-no-deselect.html

Issue 2270663002: Selection API of INPUT/TEXTAREA should not update FrameSelection without focusing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust more tests Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <body> 2 <body>
3 <input type="text" id="text" value="some sample text"> 3 <input type="text" id="text" value="some sample text">
4 </body> 4 </body>
5 </html> 5 </html>
6 6
7 <script> 7 <script>
8 // This test checks that if the user right clicks on selected text, 8 // This test checks that if the user right clicks on selected text,
9 // the selected text doesn't change or get deselected. 9 // the selected text doesn't change or get deselected.
10 var input = document.getElementById("text"); 10 var input = document.getElementById("text");
11 input.focus();
11 input.selectionStart = 5; 12 input.selectionStart = 5;
12 input.selectionEnd = 15; 13 input.selectionEnd = 15;
13 14
14 if (window.testRunner) { 15 if (window.testRunner) {
15 var x, y; 16 var x, y;
16 x = input.offsetParent.offsetLeft + input.offsetLeft + input.offsetWidth / 2 ; 17 x = input.offsetParent.offsetLeft + input.offsetLeft + input.offsetWidth / 2 ;
17 y = input.offsetParent.offsetTop + input.offsetTop + input.offsetHeight / 2; 18 y = input.offsetParent.offsetTop + input.offsetTop + input.offsetHeight / 2;
18 eventSender.mouseMoveTo(x, y); 19 eventSender.mouseMoveTo(x, y);
19 eventSender.contextClick(); 20 eventSender.contextClick();
20 } 21 }
21 22
22 </script> 23 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698