Chromium Code Reviews| Index: LayoutTests/fast/events/tabindex-no-focusable.html |
| diff --git a/LayoutTests/fast/events/tabindex-no-focusable.html b/LayoutTests/fast/events/tabindex-no-focusable.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ad30860b8aecf234d7c0446c119cc3e893f8c4c3 |
| --- /dev/null |
| +++ b/LayoutTests/fast/events/tabindex-no-focusable.html |
| @@ -0,0 +1,38 @@ |
| +<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.
|
| +if (window.testRunner) |
| + testRunner.dumpAsText(); |
| + |
| +function test() |
| +{ |
| + if (!window.testRunner) |
| + return; |
| + var elem_movetome = document.getElementById('MoveToMe'); |
| + var elem_focusme = document.getElementById('focusMe'); |
| + elem_focusme.focus(); |
| + eventSender.keyDown("\t"); |
| + var current_focus = document.activeElement; |
| + |
| + if (current_focus == elem_movetome) { // first test passed, continue with second test |
| + elem_focusme.focus(); |
| + eventSender.keyDown("\t",["shiftKey"]); |
| + current_focus = document.activeElement; |
| + |
| + if (current_focus == elem_movetome) { // second test passed |
| + document.write("PASSED"); |
| + document.close(); |
| + return; |
| + } |
| + } |
| + document.write("FAILED"); |
| + document.close(); |
| +} |
| +</script> |
| +<body onload="test()"> |
| +<input id="MoveToMe" tabindex="1"> |
| +<input tabindex="-1"> |
| +<input id="focusMe" tabindex="-1"> |
| +<input tabindex="-1"> |
| +<div id="results"></div> |
| +</body> |
| + |
| + |