Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / input-selection-hidden.html
blob52d065b878c2978cba55e02b35ef3d3508d11fdb
1 <html>
2 <head>
3 <script>
4 function log(msg) {
5 document.getElementById('res').innerHTML = document.getElementById('res').innerHTML + msg + "<br>";
8 function test () {
9 if (window.testRunner)
10 testRunner.dumpAsText();
12 var tf = document.getElementById('tf');
14 tf.setSelectionRange(3, 12);
15 log("setSelectionRange(3, 12)");
16 if (tf.selectionStart == 3 && tf.selectionEnd == 12)
17 log("Passed.");
18 else
19 log("Failed. selection start: " + tf.selectionStart + " selection end: " + tf.selectionEnd);
21 tf.style.visibility = "visible";
23 </script>
24 </head>
25 <body onload="test()">
26 This tests the selection methods on the new text field when it is hidden and then made visible.
27 <p>
28 <input type="text" id="tf" style="visibility:hidden" value="123456789 ABCDEFGHIJ"></input>
29 <div id="res"></div>
30 </p>
31 </body>
32 </html>