2 <?xml-stylesheet type=
"text/css" href=
"chrome://global/skin"?>
3 <?xml-stylesheet type=
"text/css" href=
"/tests/SimpleTest/test.css"?>
5 <window title=
"Mozilla Bug 444801"
6 xmlns:
html=
"http://www.w3.org/1999/xhtml"
7 xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
10 <script type=
"application/javascript" src=
"chrome://mochikit/content/MochiKit/packed.js"></script>
11 <script type=
"application/javascript" src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
12 <script type=
"application/javascript" src=
"chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
13 <script type=
"application/javascript" src=
"SpatialNavUtils.js"></script>
15 <body id=
"some-content" xmlns=
"http://www.w3.org/1999/xhtml">
17 <a id=
"start" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=444801">Mozilla Bug
444801</a>
19 style=
"text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border=
"1" cellpadding=
"2" cellspacing=
"2">
22 <td style=
"vertical-align: top; text-align: center;"><a id=
"1" href=
"a">test
</a></td>
23 <td style=
"vertical-align: top; text-align: center;"><a id=
"2" href=
"a">test
</a></td>
26 <td style=
"vertical-align: top; text-align: center;"><a id=
"3" href=
"a">test
</a></td>
27 <td style=
"vertical-align: top; text-align: center;"><a id=
"4" href=
"a">test
</a></td>
33 <script class=
"testbody" type=
"application/javascript">
35 Components.utils.import(
"resource://gre/modules/SpatialNavigation.js");
47 [
"enabled",
"bool", true],
48 [
"xulContentEnabled",
"bool", true],
49 [
"keyCode.modifier",
"char",
"none"],
50 [
"keyCode.right",
"int",
82], // DOM_VK_R
51 [
"keyCode.left",
"int",
76], // DOM_VK_L
52 [
"keyCode.down",
"int",
68], // DOM_VK_D
53 [
"keyCode.up",
"int",
85], // DOM_VK_U
60 // starting the test itself.
61 var x = document.getElementById(
"some-content");
62 SpatialNavigation.init(x);
64 // get to a known place.
65 document.getElementById(
"start").focus();
69 SimpleTest.waitForExplicitFinish();
71 SpatialNavigation.uninit();