Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / onselect-textarea.html
blobca5c97f682e6405f398fce4a924019b3df018d95
1 <html>
2 <head>
3 <style>
4 textarea { -webkit-appearance: textarea;}
5 </style>
6 <script>
7 function log(msg) {
8 document.getElementById('res').innerHTML = document.getElementById('res').innerHTML + msg + "<br>";
11 function test() {
12 if (window.testRunner)
13 testRunner.dumpAsText();
14 var ta = document.getElementById('ta');
16 log('Calling focus on textarea');
17 ta.focus();
18 log('After focus: textarea selection start: ' + ta.selectionStart + ' end: ' + ta.selectionEnd + '<br>');
20 log('Calling setSelectionRange on textarea');
21 ta.setSelectionRange(5, 10);
22 log('After setSelectionRange(5, 10): textarea selection start: ' + ta.selectionStart + ' end: ' + ta.selectionEnd + '<br>');
24 log('Double clicking to make selection for textarea');
25 if (window.eventSender) {
26 eventSender.mouseMoveTo(75, 55);
27 eventSender.mouseDown();
28 eventSender.mouseUp();
29 eventSender.mouseDown();
30 eventSender.mouseUp();
32 log('After double clicking: textarea selection start: ' + ta.selectionStart + ' end: ' + ta.selectionEnd + '<br>');
34 log('Calling blur on textarea');
35 ta.blur();
36 log('After blur: textarea selection start: ' + ta.selectionStart + ' end: ' + ta.selectionEnd + '<br>');
38 log('Calling focus on textarea');
39 ta.focus();
40 log('After focus: textarea selection start: ' + ta.selectionStart + ' end: ' + ta.selectionEnd);
42 </script>
43 </head>
44 <body onload="test()">
45 <br>
46 This tests onSelect for textareas. <br>
47 This also makes sure that the correct selection is restored when the element regains focus.<br><br>
48 <textarea id="ta" onselect="log('onselect fired for textarea');" style="position: absolute; top: 50; left: 10;">textarea with lots of fun content!</textarea>
49 <div id="res" style="position: absolute; top: 100; left: 10;"></div>
50 </body>
51 </html>