2008-07-08 14:51:45 -07:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
|
|
|
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css type="text/css"?>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=436084
|
|
|
|
-->
|
|
|
|
|
|
|
|
<window title="Mozilla Bug 288254"
|
|
|
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
2009-12-22 15:53:07 -08:00
|
|
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
2008-07-08 14:51:45 -07:00
|
|
|
|
|
|
|
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
|
|
|
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
|
2008-07-23 10:47:31 -07:00
|
|
|
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
|
|
|
<script type="application/javascript" src="SpatialNavUtils.js"></script>
|
2008-07-08 14:51:45 -07:00
|
|
|
|
|
|
|
<body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
|
|
|
|
<a id="start" href="https://bugzilla.mozilla.org/show_bug.cgi?id=436084">Mozilla Bug 436084</a>
|
|
|
|
<table
|
|
|
|
style="text-align: left; width: 100%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="2">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td style="vertical-align: top; text-align: center;"><a id="1" href="a">test</a></td>
|
|
|
|
<td style="vertical-align: top; text-align: center;"><a id="2" href="a">test</a></td>
|
|
|
|
<td style="vertical-align: top; text-align: center;"><a id="3" href="a">test</a></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td style="vertical-align: top; text-align: center;"><a id="4" href="a">test</a></td>
|
|
|
|
<td style="vertical-align: top; text-align: center;"><a id="5" href="a">test</a></td>
|
|
|
|
<td style="vertical-align: top; text-align: center;"><a id="6" href="a">test</a></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td style="vertical-align: top; text-align: center;"><a id="7" href="a">test</a></td>
|
|
|
|
<td style="vertical-align: top; text-align: center;"><a id="8" href="a">test</a></td>
|
|
|
|
<td style="vertical-align: top; text-align: center;"><a id="9" href="a">test</a></td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|
|
|
|
<script class="testbody" type="application/javascript">
|
|
|
|
<![CDATA[
|
2008-07-09 11:30:32 -07:00
|
|
|
Components.utils.import("resource://gre/modules/SpatialNavigation.js");
|
2008-07-08 14:51:45 -07:00
|
|
|
|
2008-07-23 10:47:31 -07:00
|
|
|
var moveTable = [
|
|
|
|
["DOWN", "1"],
|
|
|
|
["DOWN", "4"],
|
|
|
|
["DOWN", "7"],
|
|
|
|
["RIGHT", "8"],
|
|
|
|
["RIGHT", "9"],
|
|
|
|
["UP", "6"],
|
|
|
|
["UP", "3"],
|
|
|
|
["LEFT", "2"],
|
|
|
|
["LEFT", "1"],
|
|
|
|
["DONE", "DONE"]
|
|
|
|
];
|
|
|
|
|
2008-10-10 18:24:56 -07:00
|
|
|
var prefs = [
|
|
|
|
["enabled", "bool", true],
|
|
|
|
["xulContentEnabled", "bool", true],
|
|
|
|
["keyCode.modifier", "char", "none"],
|
|
|
|
];
|
|
|
|
|
2009-12-22 15:53:07 -08:00
|
|
|
function runtest()
|
2008-07-08 14:51:45 -07:00
|
|
|
{
|
2008-10-10 18:24:56 -07:00
|
|
|
prepareTest(prefs);
|
|
|
|
|
|
|
|
// starting the test itself.
|
2008-07-08 14:51:45 -07:00
|
|
|
var x = document.getElementById("some-content");
|
2008-08-05 15:44:53 -07:00
|
|
|
SpatialNavigation.init(x);
|
2008-07-08 14:51:45 -07:00
|
|
|
|
|
|
|
// get to a known place.
|
|
|
|
document.getElementById("start").focus();
|
|
|
|
|
2008-07-23 10:47:31 -07:00
|
|
|
testMoves(moveTable);
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2008-08-05 15:44:53 -07:00
|
|
|
|
|
|
|
SpatialNavigation.uninit();
|
2008-07-08 14:51:45 -07:00
|
|
|
}
|
|
|
|
|
2009-12-22 15:53:07 -08:00
|
|
|
SimpleTest.waitForFocus(runtest);
|
|
|
|
|
2008-07-08 14:51:45 -07:00
|
|
|
]]></script>
|
|
|
|
</window>
|