Missing cursor/caret showing in search field on google.com
[WebKit-https.git] / LayoutTests / editing / selection / wrapped-line-caret-3.html
1 <span>This test passes if the caret is at the start of the first line.</span>
2
3 <p id="result"></p>
4
5 <div id="edit" contentEditable="true" style="width: 350px; height: 100px; border: 1px solid blue;">a <span style=color:blue;">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span></div>
6 <script>
7 if (window.testRunner)
8     testRunner.dumpAsText();
9
10 var edit = document.getElementById("edit");
11 window.getSelection().setPosition(edit.childNodes.item(1).childNodes.item(0), 2);
12 window.getSelection().modify("move", "backward", "line");
13 window.getSelection().modify("move", "backward", "line");
14
15 document.getElementById("result").innerText = getSelection().baseOffset == 0 ? "PASS" : "FAIL";
16
17 </script>