OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../../resources/js-test.js"></script> | |
5 </head> | |
6 <body> | |
7 <input id="val1" type="text" /> | |
8 <input id="val2" type="text" /> | |
9 <script type="text/javascript"> | |
10 description("<b>Test for BUG=367736: Blink does not respect input.selectionStart and input.selectionEnd for some cases.</b>"); | |
tkent
2014/05/19 00:00:34
<b> tags are unnecessary.
Also, double-quotes are
harpreet.sk
2014/05/19 11:16:52
Done.
| |
11 var firstInput = document.getElementById('val1'); | |
12 var secondInput = document.getElementById('val2'); | |
13 if (!window.testRunner) { | |
14 debug('This test needs window.testRunner to work.'); | |
15 } else { | |
16 firstInput.selectionStart = 3; | |
17 firstInput.selectionEnd = 5; | |
18 firstInput.value = "Parsed"; | |
19 secondInput.selectionStart = 3; | |
20 secondInput.selectionEnd = 5; | |
21 secondInput.value = "P"; | |
22 shouldBe('firstInput.selectionStart', '6'); | |
tkent
2014/05/19 00:00:34
Why is it 6? firstInput doesn't have focus, so se
harpreet.sk
2014/05/19 11:16:52
I checked this case on the browser and it was show
| |
23 shouldBe('firstInput.selectionEnd', '6'); | |
24 shouldBe('secondInput.selectionStart', '1'); | |
25 shouldBe('secondInput.selectionEnd', '1'); | |
26 } | |
tkent
2014/05/19 00:00:34
We should have another scenario that secondInput.v
harpreet.sk
2014/05/19 11:16:52
Done.
| |
27 </script> | |
28 </body> | |
29 </html> | |
OLD | NEW |