Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / onselect-textfield.html
blob388c1f4cbdf75a5ce28c34efef574591dae645ee
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();
11 var tf = document.getElementById('tf');
13 log('Calling focus on text field');
14 tf.focus();
15 log('After focus: text field selection start: ' + tf.selectionStart + ' end: ' + tf.selectionEnd + '<br>');
17 log('Calling setSelectionRange on text field');
18 tf.setSelectionRange(3, 5);
19 log('After setSelectionRange(3, 5): text field selection start: ' + tf.selectionStart + ' end: ' + tf.selectionEnd + '<br>');
21 log('Double clicking to make selection for text field');
22 if (window.eventSender) {
23 eventSender.mouseMoveTo(60, 55);
24 eventSender.mouseDown();
25 eventSender.mouseUp();
26 eventSender.mouseDown();
27 eventSender.mouseUp();
29 log('After double clicking: text field selection start: ' + tf.selectionStart + ' end: ' + tf.selectionEnd + '<br>');
31 log('Calling blur on text field');
32 tf.blur();
33 log('After blur: text field selection start: ' + tf.selectionStart + ' end: ' + tf.selectionEnd + '<br>');
35 log('Calling focus on text field');
36 tf.focus();
37 log('After focus: text field selection start: ' + tf.selectionStart + ' end: ' + tf.selectionEnd);
39 </script>
40 </head>
41 <body onload="test()"><br>
42 This tests onSelect for text fields. <br><br>
43 <input type="text" id="tf" onselect="log('onselect fired for text field');" style="position: absolute; top: 50; left: 10;" value="input text"></input>
44 <div id="res" style="position: absolute; top: 100; left: 10;"></div>
45 </body>
46 </html>