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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/drag-text-delay.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, 3 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <p>On most platforms, if you click and move the mouse on selected text, it will always initiate a drag. On Mac, there must be a delay between the click and the mouse move before a drag starts. Otherwise, it will just change the selection.</ p> 4 <p>On most platforms, if you click and move the mouse on selected text, it will always initiate a drag. On Mac, there must be a delay between the click and the mouse move before a drag starts. Otherwise, it will just change the selection.</ p>
5 <p>To manually test, select "hello" and rapidly drag. You should see "hello worl d" on Mac and "worldhello" on all other platforms.</p> 5 <p>To manually test, select "hello" and rapidly drag. You should see "hello worl d" on Mac and "worldhello" on all other platforms.</p>
6 <div id="log"></div> 6 <div id="log"></div>
7 <input id="text" type="text" value="hello world" /> 7 <input id="text" type="text" value="hello world" />
8 <script> 8 <script>
9 if (window.testRunner) { 9 if (window.testRunner) {
10 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
11 11
12 var text = document.getElementById("text"); 12 var text = document.getElementById("text");
13 text.focus();
13 text.setSelectionRange(0, 5); 14 text.setSelectionRange(0, 5);
14 15
15 var start_x = text.offsetLeft + 5; 16 var start_x = text.offsetLeft + 5;
16 var start_y = text.offsetTop + text.offsetHeight / 2; 17 var start_y = text.offsetTop + text.offsetHeight / 2;
17 eventSender.mouseMoveTo(start_x, start_y); 18 eventSender.mouseMoveTo(start_x, start_y);
18 eventSender.mouseDown(); 19 eventSender.mouseDown();
19 20
20 var end_x = text.offsetLeft + text.offsetWidth - 5; 21 var end_x = text.offsetLeft + text.offsetWidth - 5;
21 var end_y = start_y; 22 var end_y = start_y;
22 eventSender.mouseMoveTo(end_x, end_y); 23 eventSender.mouseMoveTo(end_x, end_y);
23 eventSender.mouseUp(); 24 eventSender.mouseUp();
24 25
25 document.getElementById('log').innerText = text.value; 26 document.getElementById('log').innerText = text.value;
26 } 27 }
27 </script> 28 </script>
28 </body> 29 </body>
29 </html> 30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698