| Index: LayoutTests/fast/forms/setrangetext-expected.txt
|
| diff --git a/LayoutTests/fast/forms/setrangetext-expected.txt b/LayoutTests/fast/forms/setrangetext-expected.txt
|
| index 8646325aad546562bce8ec3feb9b2b13c876d3e0..daa7fd70c42cc53ab1609ad01a2411b3e8303c6c 100644
|
| --- a/LayoutTests/fast/forms/setrangetext-expected.txt
|
| +++ b/LayoutTests/fast/forms/setrangetext-expected.txt
|
| @@ -624,6 +624,130 @@ PASS element.selectionEnd is 9
|
| element.value = '0123456789'
|
| PASS element.setRangeText('A', 7, 3) threw exception IndexSizeError: Failed to execute 'setRangeText' on 'HTMLInputElement': The provided start value (7) is larger than the provided end value (3)..
|
|
|
| +Running tests on input with attributes: {"type":"email"}
|
| +
|
| +setRangeText() with only one parameter.
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(2, 5)
|
| +element.setRangeText('ABC')
|
| +PASS element.value is "01ABC56789"
|
| +PASS element.selectionStart is 2
|
| +PASS element.selectionEnd is 5
|
| +element.setRangeText('ABCD')
|
| +PASS element.value is "01ABCD56789"
|
| +PASS element.selectionStart is 2
|
| +PASS element.selectionEnd is 6
|
| +element.setRangeText('AB')
|
| +PASS element.value is "01AB56789"
|
| +PASS element.selectionStart is 2
|
| +PASS element.selectionEnd is 4
|
| +element.setRangeText('')
|
| +PASS element.value is "0156789"
|
| +PASS element.selectionStart is 2
|
| +PASS element.selectionEnd is 2
|
| +
|
| +setRangeText() with 'select' as the selectMode.
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(0, 0)
|
| +element.setRangeText('ABC', 2, 5, 'select')
|
| +PASS element.value is "01ABC56789"
|
| +PASS element.selectionStart is 2
|
| +PASS element.selectionEnd is 5
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(0, 0)
|
| +element.setRangeText('ABC', 5, 10, 'select')
|
| +PASS element.value is "01234ABC"
|
| +PASS element.selectionStart is 5
|
| +PASS element.selectionEnd is 8
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(0, 0)
|
| +element.setRangeText('ABC', 1, 2, 'select')
|
| +PASS element.value is "0ABC23456789"
|
| +PASS element.selectionStart is 1
|
| +PASS element.selectionEnd is 4
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(0, 0)
|
| +element.setRangeText('', 1, 9, 'select')
|
| +PASS element.value is "09"
|
| +PASS element.selectionStart is 1
|
| +PASS element.selectionEnd is 1
|
| +
|
| +setRangeText() with 'start' as the selectMode.
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(0, 0)
|
| +element.setRangeText('ABC', 2, 6, 'start')
|
| +PASS element.value is "01ABC6789"
|
| +PASS element.selectionStart is 2
|
| +PASS element.selectionEnd is 2
|
| +
|
| +setRangeText() with 'end' as the selectMode.
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(0, 0)
|
| +element.setRangeText('ABC', 10, 10, 'end')
|
| +PASS element.value is "0123456789ABC"
|
| +PASS element.selectionStart is 13
|
| +PASS element.selectionEnd is 13
|
| +
|
| +setRangeText() with 'preserve' as the selectMode.
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(6, 9)
|
| +element.setRangeText('A', 1, 2)
|
| +PASS element.value is "0A23456789"
|
| +PASS element.selectionStart is 6
|
| +PASS element.selectionEnd is 9
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(6, 9)
|
| +element.setRangeText('AB', 1, 1, 'invalid')
|
| +PASS element.value is "0AB123456789"
|
| +PASS element.selectionStart is 8
|
| +PASS element.selectionEnd is 11
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(6, 9)
|
| +element.setRangeText('AB', 1, 1, undefined)
|
| +PASS element.value is "0AB123456789"
|
| +PASS element.selectionStart is 8
|
| +PASS element.selectionEnd is 11
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(6, 9)
|
| +element.setRangeText('A', 1, 3, 'preserve')
|
| +PASS element.value is "0A3456789"
|
| +PASS element.selectionStart is 5
|
| +PASS element.selectionEnd is 8
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(2, 6)
|
| +element.setRangeText('A', 1, 4, 'preserve')
|
| +PASS element.value is "0A456789"
|
| +PASS element.selectionStart is 1
|
| +PASS element.selectionEnd is 4
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(2, 6)
|
| +element.setRangeText('A', 4, 6, 'preserve')
|
| +PASS element.value is "0123A6789"
|
| +PASS element.selectionStart is 2
|
| +PASS element.selectionEnd is 5
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(2, 6)
|
| +element.setRangeText('ABCDEF', 4, 7, 'preserve')
|
| +PASS element.value is "0123ABCDEF789"
|
| +PASS element.selectionStart is 2
|
| +PASS element.selectionEnd is 10
|
| +
|
| +setRangeText() with various start/end values.
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(0, 0)
|
| +element.setRangeText('A', 100, 100, 'select')
|
| +PASS element.value is "0123456789A"
|
| +PASS element.selectionStart is 10
|
| +PASS element.selectionEnd is 11
|
| +element.value = '0123456789'
|
| +element.setSelectionRange(0, 0)
|
| +element.setRangeText('A', 8, 100, 'select')
|
| +PASS element.value is "01234567A"
|
| +PASS element.selectionStart is 8
|
| +PASS element.selectionEnd is 9
|
| +element.value = '0123456789'
|
| +PASS element.setRangeText('A', 7, 3) threw exception IndexSizeError: Failed to execute 'setRangeText' on 'HTMLInputElement': The provided start value (7) is larger than the provided end value (3)..
|
| +
|
| Check that setRangeText() on disconnected elements doesn't crash and has proper values.
|
| element.value = '0123456789'
|
| element.setRangeText('ABC', 0, 0, 'select')
|
| @@ -641,12 +765,6 @@ element.value = '0123456789XYZ'
|
| PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('checkbox') does not support selection..
|
| PASS element.value is "0123456789XYZ"
|
|
|
| -Running tests on input with attributes: {"type":"email"}
|
| -
|
| -element.value = '0123456789XYZ'
|
| -PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('email') does not support selection..
|
| -PASS element.value is "0123456789XYZ"
|
| -
|
| Running tests on input with attributes: {"type":"radio"}
|
|
|
| element.value = '0123456789XYZ'
|
|
|