OLD | NEW |
1 This test checks if setSelectionRange(), selectionStart, and selectionEnd on a t
extarea and input work as expected. This includes checking edge cases such as ou
t-of-bound values. | 1 This test checks if setSelectionRange(), selectionStart, and selectionEnd on a t
extarea and input work as expected. This includes checking edge cases such as ou
t-of-bound values. |
2 | 2 |
3 If this test passed you'll see a bunch of correct selection ranges below. Check
the expected file for the correct ranges. | 3 If this test passed you'll see a bunch of correct selection ranges below. Check
the expected file for the correct ranges. |
4 | 4 |
5 | 5 |
6 ===textarea=== | 6 ===textarea=== |
7 setSelectionRange(): | 7 setSelectionRange(): |
8 3, 7 | 8 3, 7 |
9 0, 5 | 9 0, 5 |
10 42, 48 | 10 42, 48 |
11 2, 2 | 11 2, 2 |
12 | 12 |
13 selectionStart: | 13 selectionStart: |
14 3, 3 | 14 3, 3 |
15 7, 7 | 15 7, 7 |
16 0, 7 | 16 0, 7 |
17 48, 48 | 17 48, 48 |
18 3, 48 | 18 3, 48 |
19 | 19 |
20 selectionEnd: | 20 selectionEnd: |
21 3, 5 | 21 3, 5 |
22 2, 2 | 22 2, 2 |
23 0, 0 | 23 0, 0 |
24 0, 48 | 24 0, 48 |
25 7, 7 | 25 7, 7 |
26 | 26 |
| 27 selectionStart and selectionEnd in focus handler don't return wrong values 0,0: |
| 28 7, 7 |
| 29 |
27 ===input=== | 30 ===input=== |
28 setSelectionRange(): | 31 setSelectionRange(): |
29 3, 7 | 32 3, 7 |
30 0, 5 | 33 0, 5 |
31 42, 48 | 34 42, 48 |
32 2, 2 | 35 2, 2 |
33 | 36 |
34 selectionStart: | 37 selectionStart: |
35 3, 3 | 38 3, 3 |
36 7, 7 | 39 7, 7 |
37 0, 7 | 40 0, 7 |
38 48, 48 | 41 48, 48 |
39 3, 48 | 42 3, 48 |
40 | 43 |
41 selectionEnd: | 44 selectionEnd: |
42 3, 5 | 45 3, 5 |
43 2, 2 | 46 2, 2 |
44 0, 0 | 47 0, 0 |
45 0, 48 | 48 0, 48 |
46 7, 7 | 49 7, 7 |
47 | 50 |
| 51 selectionStart and selectionEnd in focus handler don't return wrong values 0,0: |
| 52 7, 7 |
| 53 |
48 ===button=== | 54 ===button=== |
49 button.selectionStart threw exception | 55 button.selectionStart threw exception |
50 button.selectionStart = 0 threw exception | 56 button.selectionStart = 0 threw exception |
51 button.selectionEnd threw exception | 57 button.selectionEnd threw exception |
52 button.selectionEnd = 0 threw exception | 58 button.selectionEnd = 0 threw exception |
53 button.setSelectionRange defined | 59 button.setSelectionRange defined |
54 button.setSelectionRange(0,0) threw exception | 60 button.setSelectionRange(0,0) threw exception |
OLD | NEW |