OLD | NEW |
1 <html> | 1 <html> |
2 <!-- | 2 <!-- |
3 This test ensures that overflowed content can be focused by Spatial Navigati
on. | 3 This test ensures that overflowed content can be focused by Spatial Navigati
on. |
4 | 4 |
5 * Pre-conditions: | 5 * Pre-conditions: |
6 1) DRT support for SNav enable/disable. | 6 1) DRT support for SNav enable/disable. |
7 | 7 |
8 * Navigation steps: | 8 * Navigation steps: |
9 1) Loads this page, focus goes to "start" automatically. | 9 1) Loads this page, focus goes to "start" automatically. |
10 3) Try to traverse the links on page down. | 10 3) Try to traverse the links on page down. |
(...skipping 19 matching lines...) Expand all Loading... |
30 <script type="application/javascript"> | 30 <script type="application/javascript"> |
31 | 31 |
32 var resultMap = [ | 32 var resultMap = [ |
33 ["Down", "start"], | 33 ["Down", "start"], |
34 ["DONE", "DONE"] | 34 ["DONE", "DONE"] |
35 ]; | 35 ]; |
36 | 36 |
37 if (window.testRunner) { | 37 if (window.testRunner) { |
38 testRunner.dumpAsText(); | 38 testRunner.dumpAsText(); |
39 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); | 39 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); |
40 testRunner.overridePreference("WebKitSpatialNavigationEnabled", 1); | 40 window.internals.settings.setSpatialNavigationEnabled(true); |
41 testRunner.waitUntilDone(); | 41 testRunner.waitUntilDone(); |
42 } | 42 } |
43 | 43 |
44 function runTest() | 44 function runTest() |
45 { | 45 { |
46 // starting the test itself: get to a known place. | 46 // starting the test itself: get to a known place. |
47 document.getElementById("start").focus(); | 47 document.getElementById("start").focus(); |
48 | 48 |
49 initTest(resultMap, testCompleted); | 49 initTest(resultMap, testCompleted); |
50 } | 50 } |
(...skipping 13 matching lines...) Expand all Loading... |
64 <div class="scroll"> | 64 <div class="scroll"> |
65 <p>It has a visible <a id="start" href="a">link_1</a>.</p> | 65 <p>It has a visible <a id="start" href="a">link_1</a>.</p> |
66 <br><br><br><br><br><br><br><br><br> | 66 <br><br><br><br><br><br><br><br><br> |
67 <p>... and an overflowed link like <a id="1" href="a">this</a>.</p> | 67 <p>... and an overflowed link like <a id="1" href="a">this</a>.</p> |
68 </div> | 68 </div> |
69 <br><br><br><br><br><br><br> | 69 <br><br><br><br><br><br><br> |
70 <p>This link should NOT get <a id="start" href="a">focused</a>.</p> | 70 <p>This link should NOT get <a id="start" href="a">focused</a>.</p> |
71 <div id="console"></div> | 71 <div id="console"></div> |
72 </body> | 72 </body> |
73 </html> | 73 </html> |
OLD | NEW |