chromium/third_party/blink/web_tests/editing/selection/modify_move/move-by-character-6.html

<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<div contenteditable id="root" class="editing">
<span id="sample">foo   bar    baz</span>
</div>
<div id="log"></div>
<script>
test(function() {
    var selection = window.getSelection();
    var sample = document.getElementById('sample');
    selection.collapse(sample, 0);
    for (i = 0; i < 11; ++i)
        selection.modify('move', 'forward', 'character');
    for (i = 0; i < 11; ++i)
        selection.modify('move', 'backward', 'character');

    assert_true(selection.isCollapsed, 'isCollapsed');
    assert_equals(selection.anchorNode, sample.firstChild, 'anchorNode');
    assert_equals(selection.anchorOffset, 0, 'anchorOffset');
});
</script>