chromium/content/test/data/accessibility/html/textarea-with-selection.html

<!--
@MAC-ALLOW:AXRoleDescription
@WIN-ALLOW:caret_offset*
@WIN-ALLOW:ia2_hypertext=*
@WIN-ALLOW:IA2_STATE*
@WIN-ALLOW:n_selections*
@WIN-ALLOW:selection_start*
@WIN-ALLOW:selection_end*
@BLINK-ALLOW:textSel*
@AURALINUX-ALLOW:text-input-type*
@AURALINUX-ALLOW:editable
@AURALINUX-ALLOW:focus*
@AURALINUX-ALLOW:*-line
@AURALINUX-ALLOW:caret_offset*
@AURALINUX-ALLOW:selection_start*
@AURALINUX-ALLOW:selection_end*
-->
<!DOCTYPE html>
<html>
<body>

<textarea rows="4" cols="50" autofocus style="font-family: monospace">
The textarea tag defines a multi-line text input control.
</textarea>

  <script>
    var textarea = document.querySelector('textarea');
    textarea.selectionStart = 0;
    textarea.selectionEnd = textarea.textLength;
  </script>
</body>
</html>