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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/4947387.html

Issue 2525273002: [Editing][CodeHealth] Convert editing/selection to utilize w3c test harness part 1. (Closed)
Patch Set: update Created 4 years 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
(Empty)
1 <p>This tests moveTo{Beginning, End}OfLineAndModifySelection. It should operate on line boundaries and not paragraph boundaries. To run it manually, click ins ide the first line of the editable region below and do Command+Shift+Left/Right Arrow, the selection should extend to the start/end of the line, not the start/e nd of the paragraph. Also, moveTo{Beginning, End}OfParagraphAndModifySelection should work.</p>
2 <div id="div" contenteditable="true" style="width: 200px;">The quick brown fox j umped over the lazy brown dog.</div>
3
4 <script>
5
6 if (window.testRunner) {
7
8 window.testRunner.dumpEditingCallbacks();
9
10 var div = document.getElementById("div");
11 var text = div.firstChild;
12 var sel = window.getSelection();
13
14 sel.collapse(text, text.length);
15 testRunner.execCommand("MoveToBeginningOfLineAndModifySelection");
16
17 sel.collapse(text, 0);
18 testRunner.execCommand("MoveToEndOfLineAndModifySelection");
19
20 sel.collapse(text, text.length);
21 testRunner.execCommand("MoveToBeginningOfParagraphAndModifySelection");
22
23 sel.collapse(text, 0);
24 testRunner.execCommand("MoveToEndOfParagraphAndModifySelection");
25 }
26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698