Bug 1648813: Verify acc description when waiting for load/layout event r=eeejay

Differential Revision: https://phabricator.services.mozilla.com/D105373
This commit is contained in:
Morgan Reschenberg 2021-02-18 18:04:59 +00:00
Родитель f7cda9a0be
Коммит e71c1fa4ff
1 изменённых файлов: 8 добавлений и 2 удалений

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

@ -35,8 +35,14 @@ addAccessibleTask(`<title>webarea test</title>`, async (browser, accDoc) => {
// event for the document. Otherwise, if the iframe loads after the
// document, we'll get one AXLoadComplete event.
let eventPromise = Promise.race([
waitForMacEvent("AXLayoutComplete"),
waitForMacEvent("AXLoadComplete"),
waitForMacEvent("AXLayoutComplete", (iface, data) => {
return (
iface.getAttributeValue("AXDescription") == "data:text/html,hello world"
);
}),
waitForMacEvent("AXLoadComplete", (iface, data) => {
return iface.getAttributeValue("AXDescription") == "webarea test";
}),
]);
await SpecialPowers.spawn(browser, [], () => {
const iframe = content.document.createElement("iframe");