3 This test ensures the basic table traversal correctness of
4 Spatial Navigation (SNav) algorithm: focusable elements in a
5 <table> should be accessible.
8 1) DRT support for SNav enable/disable.
11 1) Loads this page, focus goes to "start" automatically.
12 2) Focus moves along through the sparsely positioned elements
13 in the table, eventually going to an outer southward link,
14 but going back inside the table later on.
17 <script src=
"../../resources/js-test.js"></script>
18 <script src=
"resources/spatial-navigation-utils.js"></script>
19 <script type=
"application/javascript">
35 if (window.testRunner) {
36 testRunner.dumpAsText();
37 testRunner.overridePreference(
"WebKitTabToLinksPreferenceKey",
1);
38 window.internals.settings.setSpatialNavigationEnabled(true);
39 testRunner.waitUntilDone();
44 // starting the test itself: get to a known place.
45 document.getElementById(
"start").focus();
47 initTest(resultMap, testCompleted);
50 function testCompleted()
52 if (window.testRunner)
53 testRunner.notifyDone();
56 window.onload = runTest;
60 <body id=
"some-content" xmlns=
"http://www.w3.org/1999/xhtml">
61 <table style=
"text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border=
"1" cellpadding=
"2" cellspacing=
"1">
64 <td style=
"vertical-align: top; text-align: center;"><a id=
"start" href=
"a">a
</a></td>
65 <td style=
"vertical-align: top; text-align: center;"><a id=
"2" href=
"a">a
</a></td>
66 <td style=
"vertical-align: top; text-align: center;"><a id=
"3" href=
"a">a
</a></td>
69 <td style=
"vertical-align: top; text-align: center;"><a id=
"4" href=
"a">a
</a></td>
70 <td style=
"vertical-align: top; text-align: center;"><a id=
"5" href=
"a">a
</a></td>
71 <td style=
"vertical-align: top; text-align: center;"><a id=
"6" href=
"a">a
</a></td>
74 <td style=
"vertical-align: top; text-align: center;"><a id=
"7" href=
"a">a
</a></td>
75 <td style=
"vertical-align: top; text-align: center;"><a id=
"8" href=
"a">a
</a></td>
76 <td style=
"vertical-align: top; text-align: center;"><a id=
"9" href=
"a">a
</a></td>
80 <div style='margin-top:
100px'
>
81 <a id=
"end" href=
"a">End of table traversal test
</a>
83 <div id=
"console"></div>