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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/wrapped-line-caret-1.html

Issue 2709983005: Selection API: Do not change focus by Selection functions. (Closed)
Patch Set: . Created 3 years, 9 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 <span>This test passes if the caret is at the start of the second line.</span> 1 <span>This test passes if the caret is at the start of the second line.</span>
2 2
3 <div id="edit" contentEditable="true" style="width: 350px; height: 100px; border : 1px solid blue;">a&nbsp;</div> 3 <div id="edit" contentEditable="true" style="width: 350px; height: 100px; border : 1px solid blue;">a&nbsp;</div>
4 <script> 4 <script>
5 var edit = document.getElementById("edit"); 5 var edit = document.getElementById("edit");
6 edit.focus();
6 edit.appendChild(document.createTextNode("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx")); 7 edit.appendChild(document.createTextNode("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx"));
7 window.getSelection().collapse(edit.firstChild, 2); 8 window.getSelection().collapse(edit.firstChild, 2);
8 </script> 9 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698