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

Side by Side Diff: LayoutTests/editing/selection/collapse-null.html

Issue 560243002: Merge 181487 "Editing: Let Selection.collapse with null clears s..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2125/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/editing/selection/collapse-null-expected.txt » ('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 <body> 3 <body>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 5
6 <div id="div" contenteditable="true">hello</div> 6 <div id="div" contenteditable="true">hello</div>
7 <script> 7 <script>
8 description("Ensure that collapse with null clears selection"); 8 description("Ensure that collapse with null clears selection");
9 9
10 var selection = getSelection(); 10 var selection = getSelection();
11 selection.selectAllChildren(div); 11 selection.selectAllChildren(div);
12 selection.rangeCount 12 selection.rangeCount
13 shouldBe("selection.rangeCount", "1"); 13 shouldBe("selection.rangeCount", "1");
14 selection.collapse(null); 14 selection.collapse(null);
15 shouldBe("selection.rangeCount", "0"); 15 shouldBe("selection.rangeCount", "0");
16 selection.collapse(div.firstChild, 2); 16 selection.collapse(div.firstChild, 2);
17 shouldBe("selection.rangeCount", "1"); 17 shouldBe("selection.rangeCount", "1");
18 selection.collapse(null); 18 selection.collapse(null);
19 shouldBe("selection.rangeCount", "0"); 19 shouldBe("selection.rangeCount", "0");
20 </script> 20 </script>
21 21
22 </body> 22 </body>
23 </html> 23 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/selection/collapse-null-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698