3 This test ensures the correctness of Spatial Navigation (SNav) algorithm over single select element.
6 1) DRT support for SNav enable/disable.
9 1) Loads this page, focus goes to "start" automatically.
10 2) Focus moves away from select in 4 different directions to neighbor nodes and back.
13 <script src=
"../../resources/js-test.js"></script>
14 <script src=
"resources/spatial-navigation-utils.js"></script>
15 <script type=
"application/javascript">
29 if (window.testRunner) {
30 testRunner.dumpAsText();
31 testRunner.overridePreference(
"WebKitTabToLinksPreferenceKey",
1);
32 window.internals.settings.setSpatialNavigationEnabled(true);
33 testRunner.waitUntilDone();
38 // starting the test itself: get to a known place.
39 document.getElementById(
"start").focus();
41 initTest(resultMap, testCompleted);
44 function testCompleted()
46 if (window.testRunner)
47 testRunner.notifyDone();
50 window.onload = runTest;
54 <body id=
"some-content" xmlns=
"http://www.w3.org/1999/xhtml">
55 <table style=
"text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border=
"1" cellpadding=
"2" cellspacing=
"1">
58 <td style=
"vertical-align: top; text-align: center;"></td>
59 <td style=
"vertical-align: top; text-align: center;"><a id=
"2" href=
"a">2</a></td>
60 <td style=
"vertical-align: top; text-align: center;"></td>
63 <td style=
"vertical-align: top; text-align: center;"><a id=
"4" href=
"a">4</a></td>
64 <td style=
"vertical-align: top; text-align: center;"><input type=
"radio" id=
"start" ></td>
65 <td style=
"vertical-align: top; text-align: center;"><a id=
"6" href=
"a">6</a></td>
68 <td style=
"vertical-align: top; text-align: center;"></td>
69 <td style=
"vertical-align: top; text-align: center;"><a id=
"8" href=
"a">8</a></td>
70 <td style=
"vertical-align: top; text-align: center;"></td>
74 <div id=
"console"></div>