2008-07-23 10:47:31 -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
|
|
|
|
-->
|
|
|
|
|
2009-02-24 13:36:19 -08:00
|
|
|
<window title="Mozilla Bug 288254"
|
2008-07-23 10:47:31 -07:00
|
|
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
|
onload="onLoad();">
|
|
|
|
|
|
|
|
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
|
|
|
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
|
2009-02-24 13:36:19 -08:00
|
|
|
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
2008-07-23 10:47:31 -07:00
|
|
|
<script type="text/javascript" src="SpatialNavUtils.js"></script>
|
|
|
|
|
|
|
|
<body id="some-content" xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<a id="start" href="https://bugzilla.mozilla.org/show_bug.cgi?id=436084">Mozilla Bug 436084</a>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<input id="textinput" value="abcdefghijklmnopqrstuvwxyz" type="text"></input>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2009-02-24 13:36:19 -08:00
|
|
|
<textarea id="textarea" name="textarea" cols="30" rows="3" wrap="hard">The Book of Mozilla</textarea>
|
2008-07-23 10:47:31 -07:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<a id="end" href="https://bugzilla.mozilla.org/show_bug.cgi?id=436084">Mozilla Bug 436084</a>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
2009-02-24 13:36:19 -08:00
|
|
|
|
2008-07-23 10:47:31 -07:00
|
|
|
<script class="testbody" type="application/javascript">
|
|
|
|
<![CDATA[
|
|
|
|
Components.utils.import("resource://gre/modules/SpatialNavigation.js");
|
|
|
|
|
|
|
|
var moveTable = [
|
|
|
|
["DOWN", "textinput"],
|
2009-02-24 13:36:19 -08:00
|
|
|
["DOWN", "textinput"],
|
2008-07-23 10:47:31 -07:00
|
|
|
["DOWN", "textarea"],
|
|
|
|
["DOWN", "textarea"],
|
|
|
|
["DOWN", "end"],
|
|
|
|
["UP", "textarea"],
|
|
|
|
["UP", "textarea"],
|
|
|
|
["UP", "textinput"],
|
2009-02-24 13:36:19 -08:00
|
|
|
["UP", "textinput"],
|
2008-07-23 10:47:31 -07:00
|
|
|
["UP", "start"],
|
|
|
|
["DOWN", "textinput"],
|
2009-01-22 08:25:35 -08:00
|
|
|
["LEFT", "textinput"],
|
2009-02-24 13:36:19 -08:00
|
|
|
|
|
|
|
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textinput"],
|
|
|
|
["RIGHT", "textarea"],
|
2009-02-23 14:07:43 -08:00
|
|
|
["LEFT", "textarea"],
|
2009-02-24 13:36:19 -08:00
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "textarea"],
|
|
|
|
["RIGHT", "end"],
|
|
|
|
["UP", "textarea"],
|
2008-07-23 10:47:31 -07:00
|
|
|
["DONE", "DONE"],
|
|
|
|
];
|
|
|
|
|
2008-10-10 18:24:56 -07:00
|
|
|
var prefs = [
|
|
|
|
["enabled", "bool", true],
|
|
|
|
["xulContentEnabled", "bool", true],
|
|
|
|
["keyCode.modifier", "char", "none"],
|
|
|
|
];
|
|
|
|
|
2008-07-23 10:47:31 -07:00
|
|
|
function onLoad()
|
|
|
|
{
|
2008-10-10 18:24:56 -07:00
|
|
|
prepareTest(prefs);
|
|
|
|
|
|
|
|
// starting the test itself.
|
2008-07-23 10:47:31 -07:00
|
|
|
var x = document.getElementById("some-content");
|
2008-08-05 15:44:53 -07:00
|
|
|
SpatialNavigation.init(x);
|
2009-02-24 13:36:19 -08:00
|
|
|
|
2008-07-23 10:47:31 -07:00
|
|
|
// get to a known place.
|
|
|
|
document.getElementById("start").focus();
|
|
|
|
|
|
|
|
testMoves(moveTable);
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2008-08-05 15:44:53 -07:00
|
|
|
|
|
|
|
SpatialNavigation.uninit();
|
2008-07-23 10:47:31 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
]]></script>
|
|
|
|
</window>
|