Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
type="text/css"?>
title="Tests: XUL label text interface">
<script type="application/javascript"
src="../common.js"></script>
<script type="application/javascript"
src="../role.js"></script>
<script type="application/javascript"
src="../text.js"></script>
<script type="application/javascript">
<![CDATA[
////////////////////////////////////////////////////////////////////////////
// Testing
var gQueue = null;
function doTests()
{
//////////////////////////////////////////////////////////////////////////
// XUL label
var ids = ["label1", "label2"];
testCharacterCount(ids, 5);
testText(ids, 0, -1, "Hello");
testText(ids, 0, 1, "H");
testCharAfterOffset(ids, 0, "e", 1, 2);
testCharBeforeOffset(ids, 1, "H", 0, 1);
testCharAtOffset(ids, 1, "e", 1, 2);
//////////////////////////////////////////////////////////////////////////
// HTML input
testTextAtOffset([ getNode("tbox1") ], BOUNDARY_LINE_START,
[ [ 0, 4, "test", 0, 4 ] ]);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTests);
]]>
</script>
<vbox flex="1" style="overflow: auto;">
<a target="_blank"
title="xul:label@value accessible should implement nsIAccessibleText">
</a>
<a target="_blank"
title="Accessibility returns empty line for last line in certain cases">
</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
<label id="label1" value="Hello"/>
<label id="label2">Hello</label>
<html:input id="tbox1" value="test"/>
</vbox>
</window>