OLD | NEW |
1 <html> | 1 <html> |
2 <!-- | 2 <!-- |
3 This test ensures the correctness of Spatial Navigation (SNav) algorithm fro
m a non-focus scenario. | 3 This test ensures the correctness of Spatial Navigation (SNav) algorithm fro
m a non-focus scenario. |
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 and send key down. | 9 1) Loads this page and send key down. |
10 2) The 1st link should be focused. | 10 2) The 1st link should be focused. |
11 --> | 11 --> |
12 <head> | 12 <head> |
13 <script src="../../resources/js-test.js"></script> | 13 <script src="../../resources/js-test.js"></script> |
14 <script src="resources/spatial-navigation-utils.js"></script> | 14 <script src="resources/spatial-navigation-utils.js"></script> |
15 <script type="application/javascript"> | 15 <script type="application/javascript"> |
16 | 16 |
17 var resultMap = [ | 17 var resultMap = [ |
18 ["Down", "1"], | 18 ["Down", "1"], |
19 ["DONE", "DONE"] | 19 ["DONE", "DONE"] |
20 ]; | 20 ]; |
21 | 21 |
22 if (window.testRunner) { | 22 if (window.testRunner) { |
23 testRunner.dumpAsText(); | 23 testRunner.dumpAsText(); |
24 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); | 24 testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); |
25 testRunner.overridePreference("WebKitSpatialNavigationEnabled", 1); | 25 window.internals.settings.setSpatialNavigationEnabled(true); |
26 testRunner.waitUntilDone(); | 26 testRunner.waitUntilDone(); |
27 } | 27 } |
28 | 28 |
29 function runTest() | 29 function runTest() |
30 { | 30 { |
31 // starting the test from no focused node. | 31 // starting the test from no focused node. |
32 initTest(resultMap, testCompleted); | 32 initTest(resultMap, testCompleted); |
33 } | 33 } |
34 | 34 |
35 function testCompleted() | 35 function testCompleted() |
(...skipping 22 matching lines...) Expand all Loading... |
58 <tr> | 58 <tr> |
59 <td style="vertical-align: top; text-align: center;"><a id="7" href="a
">7</a></td> | 59 <td style="vertical-align: top; text-align: center;"><a id="7" href="a
">7</a></td> |
60 <td style="vertical-align: top; text-align: center;"><a id="8" href="a
">8</a></td> | 60 <td style="vertical-align: top; text-align: center;"><a id="8" href="a
">8</a></td> |
61 <td style="vertical-align: top; text-align: center;"><a id="9" href="a
">9</a></td> | 61 <td style="vertical-align: top; text-align: center;"><a id="9" href="a
">9</a></td> |
62 </tr> | 62 </tr> |
63 </tbody> | 63 </tbody> |
64 </table> | 64 </table> |
65 <div id="console"></div> | 65 <div id="console"></div> |
66 </body> | 66 </body> |
67 </html> | 67 </html> |
OLD | NEW |