[WK2] selection does not disappear after coping the text
[framework/web/webkit-efl.git] / LayoutTests / fast / events / keydown-keypress-focus-change.html
1 <html>\r
2 <script>\r
3     function test() {\r
4         if (window.layoutTestController) {\r
5             layoutTestController.dumpAsText();\r
6             layoutTestController.waitUntilDone();\r
7         }\r
8         setTimeout(test2, 0);\r
9     }\r
10     function test2() {\r
11         document.getElementById('tf0').focus();\r
12         eventSender.keyDown('a');\r
13         if (window.layoutTestController)\r
14             layoutTestController.notifyDone();\r
15     }\r
16     function log(msg) {\r
17         var res = document.getElementById('res');\r
18         res.innerHTML = res.innerHTML + msg + "<br>";\r
19     }\r
20 \r
21 </script> \r
22 <body onload="test()">\r
23     This tests that when the keydown event changes focus, the keypress event will go to the new focused node.<br>\r
24     To run this test manually, type a character in the first field.<br>\r
25     <input id="tf0" onkeydown="document.getElementById('tf1').focus()" onkeypress="log('Test Failed')">\r
26     <input id="tf1" onkeypress="log('Test Passed')">\r
27     <br>\r
28     <div id="res"></div>\r
29 </body>\r
30 </html>\r