chromium/third_party/blink/renderer/core/testing/data/move_range_selection_extent_input_field.html

<!DOCTYPE html>
<html id='root'>
<body>
<input type="text" id="inputfield" style='width:5em' value='Lengthy text goes here.' />
<script>
    function select() {
        var input = document.getElementById('inputfield');
        input.focus();
        var range = input.setSelectionRange(0, 6);
        window.getSelection().addRange(range);
    }
    window.onload = select;
</script>
</body>
</html>