Bug 1639328 - Fix browser_hidden_iframe.js. r=yzen

Differential Revision: https://phabricator.services.mozilla.com/D86591
This commit is contained in:
Emilio Cobos Álvarez 2020-08-10 23:00:10 +00:00
Родитель 36a4392364
Коммит a80f2b2689
1 изменённых файлов: 14 добавлений и 15 удалений

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

@ -28,21 +28,20 @@ addAccessibleTask(
);
const events = [[EVENT_REORDER, contentDocAcc]];
if (!gIsRemoteIframe) {
// Until this event is fired, IFRAME accessible has no children attached.
events.push([
EVENT_STATE_CHANGE,
event => {
const scEvent = event.QueryInterface(nsIAccessibleStateChangeEvent);
const id = getAccessibleDOMNodeID(event.accessible);
return (
id === DEFAULT_IFRAME_DOC_BODY_ID &&
scEvent.state === STATE_BUSY &&
scEvent.isEnabled === false
);
},
]);
}
// Until this event is fired, IFRAME accessible has no children attached.
events.push([
EVENT_STATE_CHANGE,
event => {
const scEvent = event.QueryInterface(nsIAccessibleStateChangeEvent);
const id = getAccessibleDOMNodeID(event.accessible);
return (
id === DEFAULT_IFRAME_DOC_BODY_ID &&
scEvent.state === STATE_BUSY &&
scEvent.isEnabled === false
);
},
]);
const onEvents = waitForEvents(events);
await SpecialPowers.spawn(browser, [DEFAULT_IFRAME_ID], contentId => {
content.document.getElementById(contentId).style.display = "";