Chromium Code Reviews| Index: LayoutTests/fast/events/tabindex-no-focusable.html |
| diff --git a/LayoutTests/fast/events/tabindex-focus-chain.html b/LayoutTests/fast/events/tabindex-no-focusable.html |
| similarity index 50% |
| copy from LayoutTests/fast/events/tabindex-focus-chain.html |
| copy to LayoutTests/fast/events/tabindex-no-focusable.html |
| index 0432e8099244277f311ee2dca28d8bcb2f2d44ac..6d16a6f6dc0687ae7a8452e3dad57d873feece0b 100644 |
| --- a/LayoutTests/fast/events/tabindex-focus-chain.html |
| +++ b/LayoutTests/fast/events/tabindex-no-focusable.html |
| @@ -2,23 +2,21 @@ |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| -var key = 0; |
| function test() |
| { |
| if (!window.testRunner) |
| return; |
| - |
| - var elem = document.getElementById('focusMe') |
| - key = -1; |
| - elem.focus(); |
| + var elem_movetome = document.getElementById('MoveToMe'); |
| + var elem_focusme = document.getElementById('focusMe'); |
| + elem_focusme.focus(); |
| eventSender.keyDown("\t"); |
| + var current_focus = document.activeElement; |
| - if (!key) { // first test passed, continue with second test |
| - key = 1; |
| - elem.focus(); |
| + if (current_focus = elem_movetome) { // first test passed, continue with second test |
|
hayato
2014/09/10 05:56:40
This should be '==' instead of '=', shouldn't this
yanagawa
2014/09/12 03:10:55
Done.
|
| + elem_focusme.focus(); |
| eventSender.keyDown("\t",["shiftKey"]); |
| - if (!key) { // second test passed |
| + if (current_focus = elem_movetome) { // second test passed |
|
hayato
2014/09/10 05:56:40
Because the focused element has changed by sending
yanagawa
2014/09/12 03:10:55
Done.
|
| document.write("PASSED"); |
| document.close(); |
| return; |
| @@ -29,8 +27,11 @@ function test() |
| } |
| </script> |
| <body onload="test()"> |
| -<input onfocus="key-=1"> |
| +<input id="MoveToMe" tabindex="1"> |
| +<input tabindex="-1"> |
| <input id="focusMe" tabindex="-1"> |
| -<input onfocus="key+=1"> |
| +<input tabindex="-1"> |
| <div id="results"></div> |
| </body> |
| + |
| + |