3 This test ensures the correctness of Spatial Navigation (SNav) algorithm from a non-focus scenario.
6 1) DRT support for SNav enable/disable.
9 1) Loads this page and send key down.
10 2) The 1st link should be focused.
13 <script src=
"../../resources/js-test.js"></script>
14 <script src=
"resources/spatial-navigation-utils.js"></script>
15 <script type=
"application/javascript">
22 if (window.testRunner) {
23 testRunner.dumpAsText();
24 testRunner.overridePreference(
"WebKitTabToLinksPreferenceKey",
1);
25 window.internals.settings.setSpatialNavigationEnabled(true);
26 testRunner.waitUntilDone();
31 // starting the test from no focused node.
32 initTest(resultMap, testCompleted);
35 function testCompleted()
37 if (window.testRunner)
38 testRunner.notifyDone();
41 window.onload = runTest;
45 <body id=
"some-content" xmlns=
"http://www.w3.org/1999/xhtml">
46 <table style=
"text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border=
"1" cellpadding=
"2" cellspacing=
"1">
49 <td style=
"vertical-align: top; text-align: center;"><a id=
"1" href=
"a">1</a></td>
50 <td style=
"vertical-align: top; text-align: center;"><a id=
"2" href=
"a">2</a></td>
51 <td style=
"vertical-align: top; text-align: center;"><a id=
"3" href=
"a">3</a></td>
54 <td style=
"vertical-align: top; text-align: center;"><a id=
"4" href=
"a">4</a></td>
55 <td style=
"vertical-align: top; text-align: center;"><a id=
"5" href=
"a">5</td>
56 <td style=
"vertical-align: top; text-align: center;"><a id=
"6" href=
"a">6</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>
61 <td style=
"vertical-align: top; text-align: center;"><a id=
"9" href=
"a">9</a></td>
65 <div id=
"console"></div>