chromium/third_party/blink/web_tests/fast/forms/selection-functions-expected.txt

This test checks if setSelectionRange(), selectionStart, and selectionEnd on a textarea and input work as expected. This includes checking edge cases such as out-of-bound values.

If this test passed you'll see a bunch of correct selection ranges below. Check the expected file for the correct ranges.

  

===textarea===
setSelectionRange():
3, 7
5, 5
42, 48
2, 2


selectionStart:
3, 3
7, 7
48, 48
48, 48
3, 48


selectionEnd:
3, 5
2, 2
2, 48
2, 48
7, 7


selectionStart and selectionEnd in focus handler don't return wrong values 0,0:
7, 7


===input===
setSelectionRange():
3, 7
5, 5
42, 48
2, 2


selectionStart:
3, 3
7, 7
48, 48
48, 48
3, 48


selectionEnd:
3, 5
2, 2
2, 48
2, 48
7, 7


selectionStart and selectionEnd in focus handler don't return wrong values 0,0:
7, 7


===button===
button.selectionStart did not throw exception
button.selectionStart = 0 threw exception
button.selectionEnd did not throw exception
button.selectionEnd = 0 threw exception
button.selectionDirection did not throw exception
button.selectionDirection = 'none' threw exception
button.setSelectionRange defined
button.setSelectionRange(0,0) threw exception