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

Side by Side Diff: LayoutTests/editing/execCommand/overtype.html

Issue 236693002: Replace Selection.collapse() with Selection.removeAllRanges() in layout tests.. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | LayoutTests/fast/html/nav-element.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 </head> 5 </head>
6 <body> 6 <body>
7 <script type="text/javascript" src="../editing.js"></script> 7 <script type="text/javascript" src="../editing.js"></script>
8 <script src="../../resources/dump-as-markup.js"></script> 8 <script src="../../resources/dump-as-markup.js"></script>
9 <div id="test" contenteditable="true"> 9 <div id="test" contenteditable="true">
10 <b>foo</b><a href="http://www.google.com/"><div id="linkText">bar</div></a> 10 <b>foo</b><a href="http://www.google.com/"><div id="linkText">bar</div></a>
11 </div> 11 </div>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 for (i = 0; i < 2; i++) 56 for (i = 0; i < 2; i++)
57 moveSelectionForwardByCharacterCommand(); 57 moveSelectionForwardByCharacterCommand();
58 for (i = 0; i < 2; i++) 58 for (i = 0; i < 2; i++)
59 extendSelectionForwardByCharacterCommand(); 59 extendSelectionForwardByCharacterCommand();
60 Markup.dump(element, 'New plain text contents with an inner selection'); 60 Markup.dump(element, 'New plain text contents with an inner selection');
61 61
62 document.execCommand("InsertText", false, 'BK'); 62 document.execCommand("InsertText", false, 'BK');
63 Markup.dump(element, 'Overwrite behaves like insert on range selections'); 63 Markup.dump(element, 'Overwrite behaves like insert on range selections');
64 64
65 element.innerHTML = "&#x4E20;&#x4E21;&#x4E22;&#x4E23;"; 65 element.innerHTML = "&#x4E20;&#x4E21;&#x4E22;&#x4E23;";
66 selection.collapse(); 66 selection.removeAllRanges();
67 Markup.dump(element, 'New CJK contents'); 67 Markup.dump(element, 'New CJK contents');
68 68
69 selection.collapse(element, 0); 69 selection.collapse(element, 0);
70 document.execCommand("InsertText", false, '\u4E14\u4E14'); 70 document.execCommand("InsertText", false, '\u4E14\u4E14');
71 Markup.dump(element, 'Overwrite CJK text'); 71 Markup.dump(element, 'Overwrite CJK text');
72 72
73 element.innerHTML="<div id=\"rtl-div\" dir=\"rtl\">&aleph;&beth;&gimel;&dale th;</div>" 73 element.innerHTML="<div id=\"rtl-div\" dir=\"rtl\">&aleph;&beth;&gimel;&dale th;</div>"
74 selection.collapse(); 74 selection.removeAllRanges();
75 Markup.dump(element, 'New RTL contents'); 75 Markup.dump(element, 'New RTL contents');
76 76
77 selection.collapse(element, 0); 77 selection.collapse(element, 0);
78 document.execCommand("InsertText", false, '\u05d0\u05d0'); 78 document.execCommand("InsertText", false, '\u05d0\u05d0');
79 Markup.dump(element, 'Overwrite RTL text'); 79 Markup.dump(element, 'Overwrite RTL text');
80 } 80 }
81 Markup.dump('console', 'console'); 81 Markup.dump('console', 'console');
82 82
83 </script> 83 </script>
84 </body> 84 </body>
85 </html> 85 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/html/nav-element.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698