Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / input-setvalue-selection.html
blob6ae05477fb52502cc312472de827e5ecfb85c49e
1 <body>
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>
5 <form>
6 <input type="text">
7 </form>
9 <script>
10 if (window.testRunner)
11 testRunner.dumpAsText();
13 input = document.getElementsByTagName("input")[0];
14 input.value = "1";
15 document.write(input.selectionStart == 1 ? "1. SUCCESS" : "1. FAILURE (the insertion point should be at the end)");
17 document.write("<br>");
18 input.focus();
19 input.value = "12";
21 document.write(input.selectionStart == 2 ? "2. SUCCESS" : "2. FAILURE (the insertion point should be at the end)");
22 </script>
24 </body>