LayoutTests:
[WebKit-https.git] / LayoutTests / fast / forms / onselect-selectall.html
1 <html>
2 <head>
3 <script src="../../editing/editing.js"></script>
4 <script>
5 function test() {
6     if (window.layoutTestController) {
7         layoutTestController.dumpAsText();
8     }
9     document.getElementById('tf').focus();
10     selectAllCommand();    
11     document.getElementById('ta').focus();
12     selectAllCommand();
13 }
14
15 function log(msg) {
16     document.getElementById('res').innerHTML = document.getElementById('res').innerHTML + msg + "<br>";
17 }
18
19 </script>
20 </head>
21 <body onload="test()">
22 This tests that onSelect will fire for textfields and textareas when select-all is invoked.<br/>
23 <input id="tf" value="test" onSelect="log('Test Passed: textfield')"><br/>
24 <textarea id="ta" onSelect="log('Test Passed: textarea')">test</textarea><br/>
25
26 <div id="res"></div>
27 </body>
28 </html>