OLD | NEW |
---|---|
(Empty) | |
1 <script> | |
2 if (window.testRunner) | |
3 testRunner.dumpAsText(); | |
4 | |
5 var key = 0; | |
6 function test() | |
7 { | |
8 if (!window.testRunner) | |
9 return; | |
10 | |
11 var elem_movetome = document.getElementById('MoveToMe') | |
12 var elem_focusme = document.getElementById('focusMe') | |
13 elem_focusme.focus(); | |
14 eventSender.keyDown("\t"); | |
15 | |
16 var current_focus=(document.activeElement || window.getSelection().focusNode ); | |
hayato
2014/09/03 05:25:26
document.activeElement isn't enough?
Is there a st
| |
17 | |
18 if (!key && elem_movetome==current_focus) { // first test passed, continue w ith second test | |
hayato
2014/09/03 05:25:26
You need spaces around oprator, such as '=='.
hayato
2014/09/03 05:25:26
You don't need `key` variable anymore because you
| |
19 elem_focusme.focus(); | |
20 eventSender.keyDown("\t",["shiftKey"]); | |
21 | |
22 current_focus=(document.activeElement || window.getSelection().focusNode ); | |
23 | |
24 if (!key && elem_movetome==current_focus) { // second test passed | |
hayato
2014/09/03 05:25:26
Ditto.
| |
25 document.write("PASSED"); | |
26 document.close(); | |
27 return; | |
28 } | |
29 } | |
30 document.write("FAILED"); | |
31 document.close(); | |
32 } | |
33 </script> | |
34 <body onload="test()"> | |
35 <input id="MoveToMe" tabindex="1"> | |
36 <input onfocus="key-=1" tabindex="-1"> | |
37 <input id="focusMe" tabindex="-1"> | |
38 <input onfocus="key+=1" tabindex="-1"> | |
39 <div id="results"></div> | |
40 </body> | |
41 | |
42 | |
OLD | NEW |