OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 <script src="resources/spatial-navigation-utils.js"></script> | 4 <script src="resources/spatial-navigation-utils.js"></script> |
5 <script type="application/javascript"> | 5 <script type="application/javascript"> |
6 | 6 |
7 var resultMap = [ | 7 var resultMap = [ |
8 ["Down", "end"], | 8 ["Down", "end"], |
9 ["DONE", "DONE"] | 9 ["DONE", "DONE"] |
10 ]; | 10 ]; |
11 | 11 |
12 if (window.testRunner) { | 12 if (window.testRunner) { |
13 testRunner.dumpAsText(); | 13 testRunner.dumpAsText(); |
14 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); | 14 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); |
15 testRunner.overridePreference("WebKitSpatialNavigationEnabled", 1); | 15 window.internals.settings.setSpatialNavigationEnabled(true); |
16 testRunner.waitUntilDone(); | 16 testRunner.waitUntilDone(); |
17 } | 17 } |
18 | 18 |
19 function runTest() | 19 function runTest() |
20 { | 20 { |
21 // starting the test itself: get to a known place. | 21 // starting the test itself: get to a known place. |
22 document.getElementById("start").focus(); | 22 document.getElementById("start").focus(); |
23 | 23 |
24 initTest(resultMap, testCompleted); | 24 initTest(resultMap, testCompleted); |
25 } | 25 } |
(...skipping 10 matching lines...) Expand all Loading... |
36 </head> | 36 </head> |
37 | 37 |
38 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml"> | 38 <body id="some-content" xmlns="http://www.w3.org/1999/xhtml"> |
39 <p>This is <a id="start" href="a">link_1</a>.</p> | 39 <p>This is <a id="start" href="a">link_1</a>.</p> |
40 <br>This is <a id="1" style="display:none;" href="a">you should not see me
</a> hidden link.<br> | 40 <br>This is <a id="1" style="display:none;" href="a">you should not see me
</a> hidden link.<br> |
41 <p>This is <a id="end" href="a">link_2</a>.</p> | 41 <p>This is <a id="end" href="a">link_2</a>.</p> |
42 <div id="console"></div> | 42 <div id="console"></div> |
43 <p>This test is to test that focusable elements with display:none do not gra
b the focus.</p> | 43 <p>This test is to test that focusable elements with display:none do not gra
b the focus.</p> |
44 </body> | 44 </body> |
45 </html> | 45 </html> |
OLD | NEW |