Bug 1280551 - Documents sometimes load with no child accessibles but all text merged into document, r=yzen

This commit is contained in:
Alexander Surkov 2016-09-21 14:15:20 -04:00
Родитель a29eef42cd
Коммит 3e59ef8ff4
2 изменённых файлов: 29 добавлений и 6 удалений

Просмотреть файл

@ -81,6 +81,10 @@ TreeWalker::Seek(nsIContent* aChildNode)
Reset();
if (mAnchorNode == aChildNode) {
return true;
}
nsIContent* childNode = nullptr;
nsINode* parentNode = aChildNode;
do {

Просмотреть файл

@ -129,19 +129,38 @@
*/
function replaceIFrameHTMLElm(aID)
{
this.__proto__ = new rootContentReplaced(aID, "New Wave");
this.eventSeq = [
new invokerChecker(EVENT_SHOW, getDocChildNode, aID),
new invokerChecker(EVENT_REORDER, getDocNode, aID)
];
this.invoke = function replaceIFrameHTMLElm_invoke()
{
var docNode = getDocNode(aID);
var newHTMLNode = docNode.createElement("html");
var newBodyNode = docNode.createElement("body");
var newTextNode = docNode.createTextNode("New Wave");
newBodyNode.appendChild(newTextNode);
newHTMLNode.appendChild(newBodyNode);
newHTMLNode.innerHTML = `<body><p>New Wave</p></body`;
docNode.replaceChild(newHTMLNode, docNode.documentElement);
}
this.finalCheck = function replaceIFrameHTMLElm_finalCheck()
{
var tree = {
role: ROLE_DOCUMENT,
children: [
{
role: ROLE_PARAGRAPH,
children: [
{
role: ROLE_TEXT_LEAF,
name: 'New Wave'
}
]
}
]
};
testAccessibleTree(getDocNode(aID), tree);
}
this.getID = function replaceIFrameHTMLElm_getID()
{
return "replace HTML element";
@ -391,8 +410,8 @@
////////////////////////////////////////////////////////////////////////////
// Test
//gA11yEventDumpID = "eventdump"; // debug stuff
//gA11yEventDumpToConsole = true;
//enableLogging('tree,verbose');
var gQueue = null;