OLD | NEW |
1 <body> | 1 <body> |
2 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=13690">bug 13960</a>
: | 2 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=13690">bug 13960</a>
: |
3 JavaScript Form Validation issue on Banco do Brasil site.</p> | 3 JavaScript Form Validation issue on Banco do Brasil site.</p> |
4 | 4 |
5 <form> | 5 <form> |
6 <input type="text"> | 6 <input type="text"> |
7 </form> | 7 </form> |
8 | 8 |
9 <script> | 9 <script> |
10 if (window.testRunner) | 10 if (window.testRunner) |
11 testRunner.dumpAsText(); | 11 testRunner.dumpAsText(); |
12 | 12 |
13 input = document.getElementsByTagName("input")[0]; | 13 input = document.getElementsByTagName("input")[0]; |
14 input.value = "1"; | 14 input.value = "1"; |
15 document.write(input.selectionStart == 1 ? "1. SUCCESS" : "1. FAILURE (the ins
ertion point should be at the end)"); | 15 document.write(input.selectionStart == 0 ? "1. SUCCESS" : "1. FAILURE (the ins
ertion point should be at the beginning)"); |
16 | 16 |
17 document.write("<br>"); | 17 document.write("<br>"); |
18 input.focus(); | 18 input.focus(); |
19 input.value = "12"; | 19 input.value = "12"; |
20 | 20 |
21 document.write(input.selectionStart == 2 ? "2. SUCCESS" : "2. FAILURE (the ins
ertion point should be at the end)"); | 21 document.write(input.selectionStart == 2 ? "2. SUCCESS" : "2. FAILURE (the ins
ertion point should be at the end)"); |
22 </script> | 22 </script> |
23 | 23 |
24 </body> | 24 </body> |
OLD | NEW |