mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 625652 - 'test a11y tree on text data removal' mochitest, r=marcoz, a=test
This commit is contained in:
parent
7f72cfd7af
commit
8cf004dfec
@ -86,6 +86,46 @@
|
||||
}
|
||||
}
|
||||
|
||||
function removeTextData(aID)
|
||||
{
|
||||
this.containerNode = getNode(aID);
|
||||
this.textNode = this.containerNode.firstChild;
|
||||
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_REORDER, this.containerNode)
|
||||
];
|
||||
|
||||
this.invoke = function removeTextData_invoke()
|
||||
{
|
||||
var tree = {
|
||||
role: ROLE_SECTION,
|
||||
children: [
|
||||
{
|
||||
role: ROLE_TEXT_LEAF,
|
||||
name: "text"
|
||||
}
|
||||
]
|
||||
};
|
||||
testAccessibleTree(this.containerNode, tree);
|
||||
|
||||
this.textNode.data = "";
|
||||
}
|
||||
|
||||
this.finalCheck = function removeTextData_finalCheck()
|
||||
{
|
||||
var tree = {
|
||||
role: ROLE_SECTION,
|
||||
children: []
|
||||
};
|
||||
testAccessibleTree(this.containerNode, tree);
|
||||
}
|
||||
|
||||
this.getID = function removeTextData_finalCheck()
|
||||
{
|
||||
return "remove text data of text node inside '" + aID + "'.";
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Test
|
||||
|
||||
@ -108,6 +148,9 @@
|
||||
// and adopts text leaf accessible, text leaf should have an action
|
||||
gQueue.push(new setOnClickNRoleAttrs("span"));
|
||||
|
||||
// text data removal of text node should remove its text accessible
|
||||
gQueue.push(new removeTextData("container2"));
|
||||
|
||||
gQueue.invoke(); // SimpleTest.finish() will be called in the end
|
||||
}
|
||||
|
||||
@ -122,6 +165,11 @@
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=545465">
|
||||
Mozilla Bug 545465
|
||||
</a>
|
||||
<a target="_blank"
|
||||
title="Make sure accessible tree is correct when rendered text is changed"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=625652">
|
||||
Mozilla Bug 625652
|
||||
</a>
|
||||
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
@ -133,6 +181,8 @@
|
||||
<span id="span">span</span>
|
||||
</div>
|
||||
|
||||
<div id="container2">text</div>
|
||||
|
||||
<div id="eventdump"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user