[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.22
[framework/web/webkit-efl.git] / LayoutTests / fast / events / arrow-navigation.html
1 <html>
2     <head>
3         <script>
4             function test()
5             {
6                 var tf = document.getElementById('tf');
7                 tf.focus();
8                 tf.setSelectionRange(0, 0);
9                 if (window.layoutTestController) {
10                     layoutTestController.dumpAsText();
11                     eventSender.keyDown("rightArrow");
12                 }
13                 if (tf.selectionStart == 1)
14                     log("Test Passed");
15                 else
16                     log("Test Failed.  Selection start: " + tf.selectionStart + " Selection end: " + tf.selectionEnd);
17             }
18             
19             function log(msg)
20             {
21                 var res = document.getElementById('res');
22                 res.innerHTML = res.innerHTML + msg + "<br>";
23             }
24         </script>
25     </head>
26     <body onload="test()">
27         This tests that you can use arrow keys to navigate.<br>
28         <input id="tf" value="test"></input>
29         <div id="res"></div>
30     </body>
31 </html>