| var tf = document.getElementById('tf'); |
| var x = tf.offsetLeft + tf.offsetWidth / 2; |
| var y = tf.offsetTop + tf.offsetHeight / 2; |
| if (window.eventSender) { |
| eventSender.mouseMoveTo(x, y); |
| if (tf.selectionStart == 0 && tf.selectionEnd == 10) { // ; |
| document.getElementById("result").innerHTML = "PASS"; |
| document.getElementById("result").innerHTML = "FAIL: selection start is " |
| + tf.selectionStart + " and end is " + tf.selectionEnd + "."; |
| <p>Tests behavior of code that calls select() inside an onclick handler. The entire field should end up selected.</p> |
| <p>The test runs only under DumpRenderTree with eventSender; if you test by hand the test result below will say FAIL.</p> |
| <p><input type="text" id="tf" onclick="this.select()" value="input text"></input></p> |
| <p id="result">TEST NOT RUN YET</p> |