OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../js/resources/js-test-pre.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 </head> | 4 </head> |
5 <body onload="test()"> | 5 <body onload="test()"> |
6 <a id="anch" href="#"></a> | 6 <a id="anch" href="#"></a> |
7 <a id="anch2" href="#"></a> | 7 <a id="anch2" href="#"></a> |
8 <input> | 8 <input> |
9 | 9 |
10 <script> | 10 <script> |
11 description('This tests that focus() and sequential focus navigation work on emp
ty anchors.'); | 11 description('This tests that focus() and sequential focus navigation work on emp
ty anchors.'); |
12 jsTestIsAsync = true; | 12 jsTestIsAsync = true; |
13 var emptyAnchor1 = document.getElementById("anch"); | 13 var emptyAnchor1 = document.getElementById("anch"); |
14 var emptyAnchor2 = document.getElementById("anch2"); | 14 var emptyAnchor2 = document.getElementById("anch2"); |
15 function test() { | 15 function test() { |
16 emptyAnchor1.focus(); | 16 emptyAnchor1.focus(); |
17 shouldBe('document.activeElement', 'emptyAnchor1'); | 17 shouldBe('document.activeElement', 'emptyAnchor1'); |
18 | 18 |
19 testRunner.overridePreference('WebKitTabToLinksPreferenceKey', true); | 19 testRunner.overridePreference('WebKitTabToLinksPreferenceKey', true); |
20 eventSender.keyDown('\t'); | 20 eventSender.keyDown('\t'); |
21 shouldBe('document.activeElement', 'emptyAnchor2'); | 21 shouldBe('document.activeElement', 'emptyAnchor2'); |
22 finishJSTest(); | 22 finishJSTest(); |
23 } | 23 } |
24 </script> | 24 </script> |
25 </body> | 25 </body> |
26 </html> | 26 </html> |
OLD | NEW |