4 if (window.layoutTestController) {
\r
5 layoutTestController.dumpAsText();
\r
6 layoutTestController.waitUntilDone();
\r
8 setTimeout(test2, 0);
\r
11 document.getElementById('tf0').focus();
\r
12 eventSender.keyDown('a');
\r
13 if (window.layoutTestController)
\r
14 layoutTestController.notifyDone();
\r
17 var res = document.getElementById('res');
\r
18 res.innerHTML = res.innerHTML + msg + "<br>";
\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
28 <div id="res"></div>
\r