Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / unrendered-space.html
blob98179e5d9b4674b5dfc344665f39fb7edafb65b9
1 <script>
2 if (window.testRunner)
3 testRunner.dumpEditingCallbacks();
4 </script>
5 <p>This tests visible position creation in unrendered space after rendered text, just before a new block. The caret should be at the end of the line containing 'foo' because we choose to treat all positions in the unrendered space after 'foo' as being visually equivalent to the position just after 'foo', and not visually equivalent to the position on the next line, before 'bar'.</p>
7 <div id="div" contenteditable="true">foo
8 <div>bar</div></div>
10 <script>
11 var s = window.getSelection();
12 var div = document.getElementById("div");
13 var text = div.firstChild;
15 s.collapse(text, text.length);
16 </script>