1 Test setRangeText() method on common input types.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
7 Running tests on input with attributes: {"type":"password"}
9 setRangeText() with only one parameter.
10 element.value = '0123456789'
11 element.setSelectionRange(2, 5)
12 element.setRangeText('ABC')
13 PASS element.value is "01ABC56789"
14 PASS element.selectionStart is 2
15 PASS element.selectionEnd is 5
16 element.setRangeText('ABCD')
17 PASS element.value is "01ABCD56789"
18 PASS element.selectionStart is 2
19 PASS element.selectionEnd is 6
20 element.setRangeText('AB')
21 PASS element.value is "01AB56789"
22 PASS element.selectionStart is 2
23 PASS element.selectionEnd is 4
24 element.setRangeText('')
25 PASS element.value is "0156789"
26 PASS element.selectionStart is 2
27 PASS element.selectionEnd is 2
29 setRangeText() with 'select' as the selectMode.
30 element.value = '0123456789'
31 element.setSelectionRange(0, 0)
32 element.setRangeText('ABC', 2, 5, 'select')
33 PASS element.value is "01ABC56789"
34 PASS element.selectionStart is 2
35 PASS element.selectionEnd is 5
36 element.value = '0123456789'
37 element.setSelectionRange(0, 0)
38 element.setRangeText('ABC', 5, 10, 'select')
39 PASS element.value is "01234ABC"
40 PASS element.selectionStart is 5
41 PASS element.selectionEnd is 8
42 element.value = '0123456789'
43 element.setSelectionRange(0, 0)
44 element.setRangeText('ABC', 1, 2, 'select')
45 PASS element.value is "0ABC23456789"
46 PASS element.selectionStart is 1
47 PASS element.selectionEnd is 4
48 element.value = '0123456789'
49 element.setSelectionRange(0, 0)
50 element.setRangeText('', 1, 9, 'select')
51 PASS element.value is "09"
52 PASS element.selectionStart is 1
53 PASS element.selectionEnd is 1
55 setRangeText() with 'start' as the selectMode.
56 element.value = '0123456789'
57 element.setSelectionRange(0, 0)
58 element.setRangeText('ABC', 2, 6, 'start')
59 PASS element.value is "01ABC6789"
60 PASS element.selectionStart is 2
61 PASS element.selectionEnd is 2
63 setRangeText() with 'end' as the selectMode.
64 element.value = '0123456789'
65 element.setSelectionRange(0, 0)
66 element.setRangeText('ABC', 10, 10, 'end')
67 PASS element.value is "0123456789ABC"
68 PASS element.selectionStart is 13
69 PASS element.selectionEnd is 13
71 setRangeText() with 'preserve' as the selectMode.
72 element.value = '0123456789'
73 element.setSelectionRange(6, 9)
74 element.setRangeText('A', 1, 2)
75 PASS element.value is "0A23456789"
76 PASS element.selectionStart is 6
77 PASS element.selectionEnd is 9
78 element.value = '0123456789'
79 element.setSelectionRange(6, 9)
80 PASS element.setRangeText('AB', 1, 1, 'invalid') threw exception TypeError: Failed to execute 'setRangeText' on 'HTMLInputElement': The provided value 'invalid' is not a valid enum value of type SelectionMode..
81 PASS element.value is "0123456789"
82 PASS element.selectionStart is 6
83 PASS element.selectionEnd is 9
84 element.value = '0123456789'
85 element.setSelectionRange(6, 9)
86 element.setRangeText('AB', 1, 1, undefined)
87 PASS element.value is "0AB123456789"
88 PASS element.selectionStart is 8
89 PASS element.selectionEnd is 11
90 element.value = '0123456789'
91 element.setSelectionRange(6, 9)
92 element.setRangeText('A', 1, 3, 'preserve')
93 PASS element.value is "0A3456789"
94 PASS element.selectionStart is 5
95 PASS element.selectionEnd is 8
96 element.value = '0123456789'
97 element.setSelectionRange(2, 6)
98 element.setRangeText('A', 1, 4, 'preserve')
99 PASS element.value is "0A456789"
100 PASS element.selectionStart is 1
101 PASS element.selectionEnd is 4
102 element.value = '0123456789'
103 element.setSelectionRange(2, 6)
104 element.setRangeText('A', 4, 6, 'preserve')
105 PASS element.value is "0123A6789"
106 PASS element.selectionStart is 2
107 PASS element.selectionEnd is 5
108 element.value = '0123456789'
109 element.setSelectionRange(2, 6)
110 element.setRangeText('ABCDEF', 4, 7, 'preserve')
111 PASS element.value is "0123ABCDEF789"
112 PASS element.selectionStart is 2
113 PASS element.selectionEnd is 10
115 setRangeText() with various start/end values.
116 element.value = '0123456789'
117 element.setSelectionRange(0, 0)
118 element.setRangeText('A', 100, 100, 'select')
119 PASS element.value is "0123456789A"
120 PASS element.selectionStart is 10
121 PASS element.selectionEnd is 11
122 element.value = '0123456789'
123 element.setSelectionRange(0, 0)
124 element.setRangeText('A', 8, 100, 'select')
125 PASS element.value is "01234567A"
126 PASS element.selectionStart is 8
127 PASS element.selectionEnd is 9
128 element.value = '0123456789'
129 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)..
131 Running tests on input with attributes: {"type":"tel"}
133 setRangeText() with only one parameter.
134 element.value = '0123456789'
135 element.setSelectionRange(2, 5)
136 element.setRangeText('ABC')
137 PASS element.value is "01ABC56789"
138 PASS element.selectionStart is 2
139 PASS element.selectionEnd is 5
140 element.setRangeText('ABCD')
141 PASS element.value is "01ABCD56789"
142 PASS element.selectionStart is 2
143 PASS element.selectionEnd is 6
144 element.setRangeText('AB')
145 PASS element.value is "01AB56789"
146 PASS element.selectionStart is 2
147 PASS element.selectionEnd is 4
148 element.setRangeText('')
149 PASS element.value is "0156789"
150 PASS element.selectionStart is 2
151 PASS element.selectionEnd is 2
153 setRangeText() with 'select' as the selectMode.
154 element.value = '0123456789'
155 element.setSelectionRange(0, 0)
156 element.setRangeText('ABC', 2, 5, 'select')
157 PASS element.value is "01ABC56789"
158 PASS element.selectionStart is 2
159 PASS element.selectionEnd is 5
160 element.value = '0123456789'
161 element.setSelectionRange(0, 0)
162 element.setRangeText('ABC', 5, 10, 'select')
163 PASS element.value is "01234ABC"
164 PASS element.selectionStart is 5
165 PASS element.selectionEnd is 8
166 element.value = '0123456789'
167 element.setSelectionRange(0, 0)
168 element.setRangeText('ABC', 1, 2, 'select')
169 PASS element.value is "0ABC23456789"
170 PASS element.selectionStart is 1
171 PASS element.selectionEnd is 4
172 element.value = '0123456789'
173 element.setSelectionRange(0, 0)
174 element.setRangeText('', 1, 9, 'select')
175 PASS element.value is "09"
176 PASS element.selectionStart is 1
177 PASS element.selectionEnd is 1
179 setRangeText() with 'start' as the selectMode.
180 element.value = '0123456789'
181 element.setSelectionRange(0, 0)
182 element.setRangeText('ABC', 2, 6, 'start')
183 PASS element.value is "01ABC6789"
184 PASS element.selectionStart is 2
185 PASS element.selectionEnd is 2
187 setRangeText() with 'end' as the selectMode.
188 element.value = '0123456789'
189 element.setSelectionRange(0, 0)
190 element.setRangeText('ABC', 10, 10, 'end')
191 PASS element.value is "0123456789ABC"
192 PASS element.selectionStart is 13
193 PASS element.selectionEnd is 13
195 setRangeText() with 'preserve' as the selectMode.
196 element.value = '0123456789'
197 element.setSelectionRange(6, 9)
198 element.setRangeText('A', 1, 2)
199 PASS element.value is "0A23456789"
200 PASS element.selectionStart is 6
201 PASS element.selectionEnd is 9
202 element.value = '0123456789'
203 element.setSelectionRange(6, 9)
204 PASS element.setRangeText('AB', 1, 1, 'invalid') threw exception TypeError: Failed to execute 'setRangeText' on 'HTMLInputElement': The provided value 'invalid' is not a valid enum value of type SelectionMode..
205 PASS element.value is "0123456789"
206 PASS element.selectionStart is 6
207 PASS element.selectionEnd is 9
208 element.value = '0123456789'
209 element.setSelectionRange(6, 9)
210 element.setRangeText('AB', 1, 1, undefined)
211 PASS element.value is "0AB123456789"
212 PASS element.selectionStart is 8
213 PASS element.selectionEnd is 11
214 element.value = '0123456789'
215 element.setSelectionRange(6, 9)
216 element.setRangeText('A', 1, 3, 'preserve')
217 PASS element.value is "0A3456789"
218 PASS element.selectionStart is 5
219 PASS element.selectionEnd is 8
220 element.value = '0123456789'
221 element.setSelectionRange(2, 6)
222 element.setRangeText('A', 1, 4, 'preserve')
223 PASS element.value is "0A456789"
224 PASS element.selectionStart is 1
225 PASS element.selectionEnd is 4
226 element.value = '0123456789'
227 element.setSelectionRange(2, 6)
228 element.setRangeText('A', 4, 6, 'preserve')
229 PASS element.value is "0123A6789"
230 PASS element.selectionStart is 2
231 PASS element.selectionEnd is 5
232 element.value = '0123456789'
233 element.setSelectionRange(2, 6)
234 element.setRangeText('ABCDEF', 4, 7, 'preserve')
235 PASS element.value is "0123ABCDEF789"
236 PASS element.selectionStart is 2
237 PASS element.selectionEnd is 10
239 setRangeText() with various start/end values.
240 element.value = '0123456789'
241 element.setSelectionRange(0, 0)
242 element.setRangeText('A', 100, 100, 'select')
243 PASS element.value is "0123456789A"
244 PASS element.selectionStart is 10
245 PASS element.selectionEnd is 11
246 element.value = '0123456789'
247 element.setSelectionRange(0, 0)
248 element.setRangeText('A', 8, 100, 'select')
249 PASS element.value is "01234567A"
250 PASS element.selectionStart is 8
251 PASS element.selectionEnd is 9
252 element.value = '0123456789'
253 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)..
255 Running tests on input with attributes: {"type":"text"}
257 setRangeText() with only one parameter.
258 element.value = '0123456789'
259 element.setSelectionRange(2, 5)
260 element.setRangeText('ABC')
261 PASS element.value is "01ABC56789"
262 PASS element.selectionStart is 2
263 PASS element.selectionEnd is 5
264 element.setRangeText('ABCD')
265 PASS element.value is "01ABCD56789"
266 PASS element.selectionStart is 2
267 PASS element.selectionEnd is 6
268 element.setRangeText('AB')
269 PASS element.value is "01AB56789"
270 PASS element.selectionStart is 2
271 PASS element.selectionEnd is 4
272 element.setRangeText('')
273 PASS element.value is "0156789"
274 PASS element.selectionStart is 2
275 PASS element.selectionEnd is 2
277 setRangeText() with 'select' as the selectMode.
278 element.value = '0123456789'
279 element.setSelectionRange(0, 0)
280 element.setRangeText('ABC', 2, 5, 'select')
281 PASS element.value is "01ABC56789"
282 PASS element.selectionStart is 2
283 PASS element.selectionEnd is 5
284 element.value = '0123456789'
285 element.setSelectionRange(0, 0)
286 element.setRangeText('ABC', 5, 10, 'select')
287 PASS element.value is "01234ABC"
288 PASS element.selectionStart is 5
289 PASS element.selectionEnd is 8
290 element.value = '0123456789'
291 element.setSelectionRange(0, 0)
292 element.setRangeText('ABC', 1, 2, 'select')
293 PASS element.value is "0ABC23456789"
294 PASS element.selectionStart is 1
295 PASS element.selectionEnd is 4
296 element.value = '0123456789'
297 element.setSelectionRange(0, 0)
298 element.setRangeText('', 1, 9, 'select')
299 PASS element.value is "09"
300 PASS element.selectionStart is 1
301 PASS element.selectionEnd is 1
303 setRangeText() with 'start' as the selectMode.
304 element.value = '0123456789'
305 element.setSelectionRange(0, 0)
306 element.setRangeText('ABC', 2, 6, 'start')
307 PASS element.value is "01ABC6789"
308 PASS element.selectionStart is 2
309 PASS element.selectionEnd is 2
311 setRangeText() with 'end' as the selectMode.
312 element.value = '0123456789'
313 element.setSelectionRange(0, 0)
314 element.setRangeText('ABC', 10, 10, 'end')
315 PASS element.value is "0123456789ABC"
316 PASS element.selectionStart is 13
317 PASS element.selectionEnd is 13
319 setRangeText() with 'preserve' as the selectMode.
320 element.value = '0123456789'
321 element.setSelectionRange(6, 9)
322 element.setRangeText('A', 1, 2)
323 PASS element.value is "0A23456789"
324 PASS element.selectionStart is 6
325 PASS element.selectionEnd is 9
326 element.value = '0123456789'
327 element.setSelectionRange(6, 9)
328 PASS element.setRangeText('AB', 1, 1, 'invalid') threw exception TypeError: Failed to execute 'setRangeText' on 'HTMLInputElement': The provided value 'invalid' is not a valid enum value of type SelectionMode..
329 PASS element.value is "0123456789"
330 PASS element.selectionStart is 6
331 PASS element.selectionEnd is 9
332 element.value = '0123456789'
333 element.setSelectionRange(6, 9)
334 element.setRangeText('AB', 1, 1, undefined)
335 PASS element.value is "0AB123456789"
336 PASS element.selectionStart is 8
337 PASS element.selectionEnd is 11
338 element.value = '0123456789'
339 element.setSelectionRange(6, 9)
340 element.setRangeText('A', 1, 3, 'preserve')
341 PASS element.value is "0A3456789"
342 PASS element.selectionStart is 5
343 PASS element.selectionEnd is 8
344 element.value = '0123456789'
345 element.setSelectionRange(2, 6)
346 element.setRangeText('A', 1, 4, 'preserve')
347 PASS element.value is "0A456789"
348 PASS element.selectionStart is 1
349 PASS element.selectionEnd is 4
350 element.value = '0123456789'
351 element.setSelectionRange(2, 6)
352 element.setRangeText('A', 4, 6, 'preserve')
353 PASS element.value is "0123A6789"
354 PASS element.selectionStart is 2
355 PASS element.selectionEnd is 5
356 element.value = '0123456789'
357 element.setSelectionRange(2, 6)
358 element.setRangeText('ABCDEF', 4, 7, 'preserve')
359 PASS element.value is "0123ABCDEF789"
360 PASS element.selectionStart is 2
361 PASS element.selectionEnd is 10
363 setRangeText() with various start/end values.
364 element.value = '0123456789'
365 element.setSelectionRange(0, 0)
366 element.setRangeText('A', 100, 100, 'select')
367 PASS element.value is "0123456789A"
368 PASS element.selectionStart is 10
369 PASS element.selectionEnd is 11
370 element.value = '0123456789'
371 element.setSelectionRange(0, 0)
372 element.setRangeText('A', 8, 100, 'select')
373 PASS element.value is "01234567A"
374 PASS element.selectionStart is 8
375 PASS element.selectionEnd is 9
376 element.value = '0123456789'
377 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)..
379 Running tests on input with attributes: {"type":"text","dir":"rtl"}
381 setRangeText() with only one parameter.
382 element.value = '0123456789'
383 element.setSelectionRange(2, 5)
384 element.setRangeText('ABC')
385 PASS element.value is "01ABC56789"
386 PASS element.selectionStart is 2
387 PASS element.selectionEnd is 5
388 element.setRangeText('ABCD')
389 PASS element.value is "01ABCD56789"
390 PASS element.selectionStart is 2
391 PASS element.selectionEnd is 6
392 element.setRangeText('AB')
393 PASS element.value is "01AB56789"
394 PASS element.selectionStart is 2
395 PASS element.selectionEnd is 4
396 element.setRangeText('')
397 PASS element.value is "0156789"
398 PASS element.selectionStart is 2
399 PASS element.selectionEnd is 2
401 setRangeText() with 'select' as the selectMode.
402 element.value = '0123456789'
403 element.setSelectionRange(0, 0)
404 element.setRangeText('ABC', 2, 5, 'select')
405 PASS element.value is "01ABC56789"
406 PASS element.selectionStart is 2
407 PASS element.selectionEnd is 5
408 element.value = '0123456789'
409 element.setSelectionRange(0, 0)
410 element.setRangeText('ABC', 5, 10, 'select')
411 PASS element.value is "01234ABC"
412 PASS element.selectionStart is 5
413 PASS element.selectionEnd is 8
414 element.value = '0123456789'
415 element.setSelectionRange(0, 0)
416 element.setRangeText('ABC', 1, 2, 'select')
417 PASS element.value is "0ABC23456789"
418 PASS element.selectionStart is 1
419 PASS element.selectionEnd is 4
420 element.value = '0123456789'
421 element.setSelectionRange(0, 0)
422 element.setRangeText('', 1, 9, 'select')
423 PASS element.value is "09"
424 PASS element.selectionStart is 1
425 PASS element.selectionEnd is 1
427 setRangeText() with 'start' as the selectMode.
428 element.value = '0123456789'
429 element.setSelectionRange(0, 0)
430 element.setRangeText('ABC', 2, 6, 'start')
431 PASS element.value is "01ABC6789"
432 PASS element.selectionStart is 2
433 PASS element.selectionEnd is 2
435 setRangeText() with 'end' as the selectMode.
436 element.value = '0123456789'
437 element.setSelectionRange(0, 0)
438 element.setRangeText('ABC', 10, 10, 'end')
439 PASS element.value is "0123456789ABC"
440 PASS element.selectionStart is 13
441 PASS element.selectionEnd is 13
443 setRangeText() with 'preserve' as the selectMode.
444 element.value = '0123456789'
445 element.setSelectionRange(6, 9)
446 element.setRangeText('A', 1, 2)
447 PASS element.value is "0A23456789"
448 PASS element.selectionStart is 6
449 PASS element.selectionEnd is 9
450 element.value = '0123456789'
451 element.setSelectionRange(6, 9)
452 PASS element.setRangeText('AB', 1, 1, 'invalid') threw exception TypeError: Failed to execute 'setRangeText' on 'HTMLInputElement': The provided value 'invalid' is not a valid enum value of type SelectionMode..
453 PASS element.value is "0123456789"
454 PASS element.selectionStart is 6
455 PASS element.selectionEnd is 9
456 element.value = '0123456789'
457 element.setSelectionRange(6, 9)
458 element.setRangeText('AB', 1, 1, undefined)
459 PASS element.value is "0AB123456789"
460 PASS element.selectionStart is 8
461 PASS element.selectionEnd is 11
462 element.value = '0123456789'
463 element.setSelectionRange(6, 9)
464 element.setRangeText('A', 1, 3, 'preserve')
465 PASS element.value is "0A3456789"
466 PASS element.selectionStart is 5
467 PASS element.selectionEnd is 8
468 element.value = '0123456789'
469 element.setSelectionRange(2, 6)
470 element.setRangeText('A', 1, 4, 'preserve')
471 PASS element.value is "0A456789"
472 PASS element.selectionStart is 1
473 PASS element.selectionEnd is 4
474 element.value = '0123456789'
475 element.setSelectionRange(2, 6)
476 element.setRangeText('A', 4, 6, 'preserve')
477 PASS element.value is "0123A6789"
478 PASS element.selectionStart is 2
479 PASS element.selectionEnd is 5
480 element.value = '0123456789'
481 element.setSelectionRange(2, 6)
482 element.setRangeText('ABCDEF', 4, 7, 'preserve')
483 PASS element.value is "0123ABCDEF789"
484 PASS element.selectionStart is 2
485 PASS element.selectionEnd is 10
487 setRangeText() with various start/end values.
488 element.value = '0123456789'
489 element.setSelectionRange(0, 0)
490 element.setRangeText('A', 100, 100, 'select')
491 PASS element.value is "0123456789A"
492 PASS element.selectionStart is 10
493 PASS element.selectionEnd is 11
494 element.value = '0123456789'
495 element.setSelectionRange(0, 0)
496 element.setRangeText('A', 8, 100, 'select')
497 PASS element.value is "01234567A"
498 PASS element.selectionStart is 8
499 PASS element.selectionEnd is 9
500 element.value = '0123456789'
501 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)..
503 Running tests on input with attributes: {"type":"url"}
505 setRangeText() with only one parameter.
506 element.value = '0123456789'
507 element.setSelectionRange(2, 5)
508 element.setRangeText('ABC')
509 PASS element.value is "01ABC56789"
510 PASS element.selectionStart is 2
511 PASS element.selectionEnd is 5
512 element.setRangeText('ABCD')
513 PASS element.value is "01ABCD56789"
514 PASS element.selectionStart is 2
515 PASS element.selectionEnd is 6
516 element.setRangeText('AB')
517 PASS element.value is "01AB56789"
518 PASS element.selectionStart is 2
519 PASS element.selectionEnd is 4
520 element.setRangeText('')
521 PASS element.value is "0156789"
522 PASS element.selectionStart is 2
523 PASS element.selectionEnd is 2
525 setRangeText() with 'select' as the selectMode.
526 element.value = '0123456789'
527 element.setSelectionRange(0, 0)
528 element.setRangeText('ABC', 2, 5, 'select')
529 PASS element.value is "01ABC56789"
530 PASS element.selectionStart is 2
531 PASS element.selectionEnd is 5
532 element.value = '0123456789'
533 element.setSelectionRange(0, 0)
534 element.setRangeText('ABC', 5, 10, 'select')
535 PASS element.value is "01234ABC"
536 PASS element.selectionStart is 5
537 PASS element.selectionEnd is 8
538 element.value = '0123456789'
539 element.setSelectionRange(0, 0)
540 element.setRangeText('ABC', 1, 2, 'select')
541 PASS element.value is "0ABC23456789"
542 PASS element.selectionStart is 1
543 PASS element.selectionEnd is 4
544 element.value = '0123456789'
545 element.setSelectionRange(0, 0)
546 element.setRangeText('', 1, 9, 'select')
547 PASS element.value is "09"
548 PASS element.selectionStart is 1
549 PASS element.selectionEnd is 1
551 setRangeText() with 'start' as the selectMode.
552 element.value = '0123456789'
553 element.setSelectionRange(0, 0)
554 element.setRangeText('ABC', 2, 6, 'start')
555 PASS element.value is "01ABC6789"
556 PASS element.selectionStart is 2
557 PASS element.selectionEnd is 2
559 setRangeText() with 'end' as the selectMode.
560 element.value = '0123456789'
561 element.setSelectionRange(0, 0)
562 element.setRangeText('ABC', 10, 10, 'end')
563 PASS element.value is "0123456789ABC"
564 PASS element.selectionStart is 13
565 PASS element.selectionEnd is 13
567 setRangeText() with 'preserve' as the selectMode.
568 element.value = '0123456789'
569 element.setSelectionRange(6, 9)
570 element.setRangeText('A', 1, 2)
571 PASS element.value is "0A23456789"
572 PASS element.selectionStart is 6
573 PASS element.selectionEnd is 9
574 element.value = '0123456789'
575 element.setSelectionRange(6, 9)
576 PASS element.setRangeText('AB', 1, 1, 'invalid') threw exception TypeError: Failed to execute 'setRangeText' on 'HTMLInputElement': The provided value 'invalid' is not a valid enum value of type SelectionMode..
577 PASS element.value is "0123456789"
578 PASS element.selectionStart is 6
579 PASS element.selectionEnd is 9
580 element.value = '0123456789'
581 element.setSelectionRange(6, 9)
582 element.setRangeText('AB', 1, 1, undefined)
583 PASS element.value is "0AB123456789"
584 PASS element.selectionStart is 8
585 PASS element.selectionEnd is 11
586 element.value = '0123456789'
587 element.setSelectionRange(6, 9)
588 element.setRangeText('A', 1, 3, 'preserve')
589 PASS element.value is "0A3456789"
590 PASS element.selectionStart is 5
591 PASS element.selectionEnd is 8
592 element.value = '0123456789'
593 element.setSelectionRange(2, 6)
594 element.setRangeText('A', 1, 4, 'preserve')
595 PASS element.value is "0A456789"
596 PASS element.selectionStart is 1
597 PASS element.selectionEnd is 4
598 element.value = '0123456789'
599 element.setSelectionRange(2, 6)
600 element.setRangeText('A', 4, 6, 'preserve')
601 PASS element.value is "0123A6789"
602 PASS element.selectionStart is 2
603 PASS element.selectionEnd is 5
604 element.value = '0123456789'
605 element.setSelectionRange(2, 6)
606 element.setRangeText('ABCDEF', 4, 7, 'preserve')
607 PASS element.value is "0123ABCDEF789"
608 PASS element.selectionStart is 2
609 PASS element.selectionEnd is 10
611 setRangeText() with various start/end values.
612 element.value = '0123456789'
613 element.setSelectionRange(0, 0)
614 element.setRangeText('A', 100, 100, 'select')
615 PASS element.value is "0123456789A"
616 PASS element.selectionStart is 10
617 PASS element.selectionEnd is 11
618 element.value = '0123456789'
619 element.setSelectionRange(0, 0)
620 element.setRangeText('A', 8, 100, 'select')
621 PASS element.value is "01234567A"
622 PASS element.selectionStart is 8
623 PASS element.selectionEnd is 9
624 element.value = '0123456789'
625 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)..
627 Check that setRangeText() on disconnected elements doesn't crash and has proper values.
628 element.value = '0123456789'
629 element.setRangeText('ABC', 0, 0, 'select')
630 FAIL element.value should be ABC0123456789. Was 0123456789.
632 Running tests on input with attributes: {"type":"button"}
634 element.value = '0123456789XYZ'
635 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('button') does not support selection..
636 PASS element.value is "0123456789XYZ"
638 Running tests on input with attributes: {"type":"checkbox"}
640 element.value = '0123456789XYZ'
641 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..
642 PASS element.value is "0123456789XYZ"
644 Running tests on input with attributes: {"type":"email"}
646 element.value = '0123456789XYZ'
647 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..
648 PASS element.value is "0123456789XYZ"
650 Running tests on input with attributes: {"type":"radio"}
652 element.value = '0123456789XYZ'
653 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('radio') does not support selection..
654 PASS element.value is "0123456789XYZ"
656 Running tests on input with attributes: {"type":"reset"}
658 element.value = '0123456789XYZ'
659 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('reset') does not support selection..
660 PASS element.value is "0123456789XYZ"
662 Running tests on input with attributes: {"type":"submit"}
664 element.value = '0123456789XYZ'
665 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('submit') does not support selection..
666 PASS element.value is "0123456789XYZ"
667 PASS successfullyParsed is true