Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / 4889598.html
blob8b101ccaf0dbd5118e7f0d68eea503a60df11a0f
1 <p>This tests for a bug moving down by a line from a line just above a ToDo, and moving up by a line from just below a ToDo.</p>
2 <div id="div" contenteditable="true">
3 <div id="above">Click anywhere in this line and move down.</div>
4 <table border="1" contenteditable="false"><tr><td>The caret <span style="color: blue;" contenteditable="true">should</span> always go into the editable region.</td></tr></table>
5 <div id="below">Click anywhere in this line and move up.</div>
6 </div>
8 <script>
9 if (window.testRunner)
10 window.testRunner.dumpEditingCallbacks();
11 var selection = window.getSelection();
12 var above = document.getElementById("above").firstChild;
13 selection.collapse(above, 0);
14 selection.modify("move", "forward", "line");
15 selection.collapse(above, above.length);
16 selection.modify("move", "forward", "line");
17 var below = document.getElementById("below").firstChild;
18 selection.collapse(below, 0);
19 selection.modify("move", "backward", "line");
20 selection.collapse(below, below.length);
21 selection.modify("move", "backward", "line");
22 </script>