chromium/third_party/blink/web_tests/fast/forms/text/input-text-double-click.html

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

<input type="text" value="word another">
<script>
test(() => {
  eventSender.mouseMoveTo(15, 15);
  eventSender.mouseDown();
  eventSender.mouseUp();
  eventSender.mouseDown();
  eventSender.mouseUp();

  const input = document.querySelector('input');
  assert_equals(input.selectionStart, 0, 'input.selectionStart');

  // On windows, selection is supposed to include the space after the word.
  const expectedSelectionEnd = navigator.platform.includes('Win') ? 5 : 4;
  assert_equals(input.selectionEnd, expectedSelectionEnd, 'input.selectionEnd');
}, 'Double-clicking a word in an input element should select it.');
</script>