Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <script> | |
|
hayato
2014/09/12 04:37:12
Ditto. You might update this test also as I commen
yanagawa
2014/09/12 06:04:48
Done.
| |
| 2 if (window.testRunner) | |
| 3 testRunner.dumpAsText(); | |
| 4 | |
| 5 function test() | |
| 6 { | |
| 7 if (!window.testRunner) | |
| 8 return; | |
| 9 var elem_movetome = document.getElementById('MoveToMe'); | |
| 10 var elem_focusme = document.getElementById('focusMe'); | |
| 11 elem_focusme.focus(); | |
| 12 eventSender.keyDown("\t"); | |
| 13 var current_focus = document.activeElement; | |
| 14 | |
| 15 if (current_focus == elem_movetome) { // first test passed, continue with se cond test | |
| 16 elem_focusme.focus(); | |
| 17 eventSender.keyDown("\t",["shiftKey"]); | |
| 18 current_focus = document.activeElement; | |
| 19 | |
| 20 if (current_focus == elem_movetome) { // second test passed | |
| 21 document.write("PASSED"); | |
| 22 document.close(); | |
| 23 return; | |
| 24 } | |
| 25 } | |
| 26 document.write("FAILED"); | |
| 27 document.close(); | |
| 28 } | |
| 29 </script> | |
| 30 <body onload="test()"> | |
| 31 <input id="MoveToMe" tabindex="1"> | |
| 32 <input tabindex="-1"> | |
| 33 <input id="focusMe" tabindex="-1"> | |
| 34 <input tabindex="-1"> | |
| 35 <div id="results"></div> | |
| 36 </body> | |
| 37 | |
| 38 | |
| OLD | NEW |