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="Accessible XUL tree hierarchy tests">
<script type="application/javascript"
src="../treeview.js" />
<script type="application/javascript"
src="../common.js" />
<script type="application/javascript"
src="../role.js" />
<script type="application/javascript"
src="../states.js" />
<script type="application/javascript"
src="../events.js" />
<script type="application/javascript">
<![CDATA[
async function doTest() {
for (let treeID of ["tree", "treetable"]) {
let treeNode = getNode(treeID);
let reordered = waitForEvent(EVENT_REORDER, treeNode);
treeNode.view = new nsTreeTreeView();
await reordered;
let treeAcc = getAccessible(treeID);
let lastItem = treeAcc.lastChild;
let lastCell = lastItem.lastChild;
reordered = waitForEvent(EVENT_REORDER, document);
treeNode.remove();
await reordered;
testIsDefunct(treeAcc, treeID);
testIsDefunct(lastItem, "last item of " + treeID);
if (lastCell) {
testIsDefunct(lastCell, "last item cell of " + treeID);
}
}
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTest);
]]>
</script>
<hbox flex="1" style="overflow: auto;">
<a target="_blank"
title="Reorganize implementation of XUL tree accessibility">
</a><br/>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
<vbox flex="1">
<tree id="tree" flex="1">
<treecols>
<treecol id="col" flex="1" primary="true" label="column"/>
</treecols>
<treechildren/>
</tree>
<tree id="treetable" flex="1">
<treecols>
<treecol id="col1" flex="1" primary="true" label="column"/>
<treecol id="col2" flex="1" label="column 2"/>
</treecols>
<treechildren/>
</tree>
</vbox>
</hbox>
</window>