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 | |
yosin_UTC9
2014/05/09 07:12:21
nit: Please remove this extra blank line.
harpreet.sk
2014/05/14 10:24:10
Done.
| |
11 description("<b>Test for BUG=367736: Blink does not respect input.selectionStart and input.selectionEnd for some cases.</b>"); | |
12 var firstInput = document.getElementById('val1'); | |
13 var secondInput = document.getElementById('val2'); | |
14 testSelection(); | |
yosin_UTC9
2014/05/09 07:12:21
nit: It seems we can inline |testSelection()| here
harpreet.sk
2014/05/14 10:24:10
Done.
| |
15 | |
16 function testSelection() | |
17 { | |
18 if (!window.testRunner) { | |
19 debug('This test needs window.testRunner to work.'); | |
20 return; | |
21 } | |
22 | |
23 firstInput.selectionStart = 3; | |
24 firstInput.selectionEnd = 5; | |
25 firstInput.value = "Parsed"; | |
26 secondInput.selectionStart = 3; | |
27 secondInput.selectionEnd = 5; | |
28 secondInput.value = "P"; | |
29 shouldBe('firstInput.selectionStart', '6'); | |
30 shouldBe('firstInput.selectionEnd', '6'); | |
31 shouldBe('secondInput.selectionStart', '1'); | |
32 shouldBe('secondInput.selectionEnd', '1'); | |
33 } | |
34 | |
35 </script> | |
36 </head> | |
yosin_UTC9
2014/05/09 07:12:21
nit: Please remove this extra "</head>".
harpreet.sk
2014/05/14 10:24:10
Done.
| |
37 | |
yosin_UTC9
2014/05/09 07:12:21
nit: Please remove this extra blank line.
harpreet.sk
2014/05/14 10:24:10
Done.
| |
38 </body> | |
39 </html> | |
OLD | NEW |