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">
37 if (window.testRunner) {
38 testRunner.dumpAsText();
39 testRunner.overridePreference(
"WebKitTabToLinksPreferenceKey",
1);
40 window.internals.settings.setSpatialNavigationEnabled(true);
41 testRunner.waitUntilDone();
46 // starting the test itself: get to a known place.
47 document.getElementById(
"start").focus();
49 initTest(resultMap, testCompleted);
52 function testCompleted()
54 if (window.testRunner)
55 shouldBe(
"document.getElementById('down').checked",
"true");
56 testRunner.notifyDone();
59 window.onload = runTest;
63 <body id=
"some-content" xmlns=
"http://www.w3.org/1999/xhtml">
64 <table style=
"text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border=
"1" cellpadding=
"2" cellspacing=
"1">
67 <td style=
"vertical-align: center; text-align: center;"></td>
68 <td style=
"vertical-align: center; text-align: center;"><a id=
"2" href=
"a">2</a></td>
69 <td style=
"vertical-align: center; text-align: center;"></td>
72 <td style=
"vertical-align: center; text-align: center;"><a id=
"4" href=
"a">4</a></td>
73 <td style=
"vertical-align: center; text-align: center;">
74 <table style=
"text-align: center; width: 100%; margin-left: auto; margin-right: auto;" border=
"1" cellpadding=
"2" cellspacing=
"1">
77 <td style=
"vertical-align: center; text-align: center;"></td>
78 <td style=
"vertical-align: center; text-align: center;"><input type=
"radio" name=
"group" id=
"up" ></td>
79 <td style=
"vertical-align: center; text-align: center;"></td>
82 <td style=
"vertical-align: center; text-align: center;"><input type=
"radio" name=
"group" id=
"left" ></td>
83 <td style=
"vertical-align: center; text-align: center;">
84 <input type=
"radio" name=
"group" id=
"start" >
86 <td style=
"vertical-align: center; text-align: center;"><input type=
"radio" name=
"group" id=
"right" ></td>
89 <td style=
"vertical-align: center; text-align: center;"></td>
90 <td style=
"vertical-align: center; text-align: center;"><input type=
"radio" name=
"group" id=
"down" checked
></td>
91 <td style=
"vertical-align: center; text-align: center;"></td>
96 <td style=
"vertical-align: center; text-align: center;"><a id=
"6" href=
"a">6</a></td>
99 <td style=
"vertical-align: center; text-align: center;"></td>
100 <td style=
"vertical-align: center; text-align: center;"><a id=
"8" href=
"a">8</a></td>
101 <td style=
"vertical-align: center; text-align: center;"></td>
105 <div id=
"console"></div>