chromium/third_party/blink/web_tests/editing/selection/wrapped-line-caret-3.html

<span>This test passes if the caret is at the start of the first line.</span>

<p id="result"></p>

<div id="edit" contentEditable="true" style="width: 350px; height: 100px; border: 1px solid blue;">a <span style=color:blue;">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span></div>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

var edit = document.getElementById("edit");
window.getSelection().collapse(edit.childNodes.item(1).childNodes.item(0), 2);
window.getSelection().modify("move", "backward", "line");
window.getSelection().modify("move", "backward", "line");

document.getElementById("result").innerText = getSelection().baseOffset == 0 ? "PASS" : "FAIL";

</script>