<body contenteditable="true"></body>
<script src="../../resources/dump-as-markup.js"></script>
<script>
var sel = window.getSelection();
sel.setPosition(document.body, 0);
document.execCommand("InsertText", false, "This tests for a bug where selecting a word would select the line break and word before it.  Only the word in the paragraph below should be selected:");
document.execCommand("InsertParagraph");
document.execCommand("InsertText", false, "foo");
sel.modify("extend", "backward", "word");
document.querySelectorAll('script').forEach((script) => script.remove());
</script>
