Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / toolkit / spatial-navigation / tests / chrome / test_snav_prefKeyCode.xul
blob0ae9bb0f9e461e2dbb13b56553fe34b0f4459585
1 <?xml version="1.0"?>
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"
8 onload="onLoad();">
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>
18 <table
19 style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="2">
20 <tbody>
21 <tr>
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>
24 </tr>
25 <tr>
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>
28 </tr>
29 </tbody>
30 </table>
31 </body>
33 <script class="testbody" type="application/javascript">
34 <![CDATA[
35 Components.utils.import("resource://gre/modules/SpatialNavigation.js");
37 var moveTable = [
38 ["D", "1"],
39 ["D", "3"],
40 ["R", "4"],
41 ["U", "2"],
42 ["L", "1"],
43 ["DONE", "DONE"],
46 var prefs = [
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
56 function onLoad()
58 prepareTest(prefs);
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();
67 testMoves(moveTable);
69 SimpleTest.waitForExplicitFinish();
71 SpatialNavigation.uninit();
74 ]]>
75 </script>
76 </window>