<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<body>
    <div id="target"><span contenteditable="true">D</span></div>
</body>
<script>
    test(() => {
        let selection = getSelection();
        let range = document.createRange();
        let element = document.getElementById("target").firstChild;
        range.setStartAfter(element.firstChild);
        range.setEndAfter(element.firstChild);
        selection.removeAllRanges()