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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/pasteboard/data-transfer-items-drag-drop-string.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 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <input id="source1" value="Lorem ipsum">Lorem ipsum</input> 7 <input id="source1" value="Lorem ipsum">Lorem ipsum</input>
8 <input id="source2" value="http://example.com"></input> 8 <input id="source2" value="http://example.com"></input>
9 <div id="destination" style="min-height:100px; border: solid 1px black">Drop tex t here if you test this manually</div> 9 <div id="destination" style="min-height:100px; border: solid 1px black">Drop tex t here if you test this manually</div>
10 10
(...skipping 24 matching lines...) Expand all
35 finishJSTest(); 35 finishJSTest();
36 return; 36 return;
37 } 37 }
38 38
39 var sourceId = testSources[testIndex++]; 39 var sourceId = testSources[testIndex++];
40 var source = document.getElementById(sourceId); 40 var source = document.getElementById(sourceId);
41 expectedDroppedText = source.value; 41 expectedDroppedText = source.value;
42 debug('Dragging text in ' + sourceId + ': ' + source.value); 42 debug('Dragging text in ' + sourceId + ': ' + source.value);
43 43
44 // Drag a text in the source element. 44 // Drag a text in the source element.
45 source.focus();
45 source.setSelectionRange(0, source.value.length); 46 source.setSelectionRange(0, source.value.length);
46 x = source.offsetLeft + 10; 47 x = source.offsetLeft + 10;
47 y = source.offsetTop + source.offsetHeight / 2; 48 y = source.offsetTop + source.offsetHeight / 2;
48 eventSender.mouseMoveTo(x, y); 49 eventSender.mouseMoveTo(x, y);
49 eventSender.mouseDown(); 50 eventSender.mouseDown();
50 51
51 // Drop it off to the destination field. 52 // Drop it off to the destination field.
52 var destination = document.getElementById("destination"); 53 var destination = document.getElementById("destination");
53 eventSender.leapForward(500); 54 eventSender.leapForward(500);
54 eventSender.mouseMoveTo(destination.offsetLeft + 10, destination.offsetTop + destination.offsetHeight / 2); 55 eventSender.mouseMoveTo(destination.offsetLeft + 10, destination.offsetTop + destination.offsetHeight / 2);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 runNextTest(); 88 runNextTest();
88 }); 89 });
89 } 90 }
90 } 91 }
91 92
92 startTest(); 93 startTest();
93 94
94 </script> 95 </script>
95 </body> 96 </body>
96 </html> 97 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698