Bug 1787291 - Modify mac popup test to wait for cache updates. r=morgan

Differential Revision: https://phabricator.services.mozilla.com/D155617
This commit is contained in:
Eitan Isaacson 2022-08-25 23:22:53 +00:00
parent 055a8632de
commit 23fc627ed6

View File

@ -97,8 +97,8 @@ addAccessibleTask(
.setAttribute("aria-haspopup", "true");
});
is(
menuID.getAttributeValue("AXPopupValue"),
await untilCacheIs(
() => menuID.getAttributeValue("AXPopupValue"),
"true",
"Correct AXPopupValue after change for menu"
);
@ -114,8 +114,8 @@ addAccessibleTask(
});
await stateChanged;
is(
menuID.getAttributeValue("AXPopupValue"),
await untilCacheIs(
() => menuID.getAttributeValue("AXPopupValue"),
null,
"Correct AXPopupValue after remove for menu"
);
@ -144,8 +144,8 @@ addAccessibleTask(
.setAttribute("aria-haspopup", "true");
});
is(
listboxID.getAttributeValue("AXPopupValue"),
await untilCacheIs(
() => listboxID.getAttributeValue("AXPopupValue"),
"true",
"Correct AXPopupValue after change for listbox"
);
@ -193,8 +193,8 @@ addAccessibleTask(
.setAttribute("aria-haspopup", "true");
});
is(
treeID.getAttributeValue("AXPopupValue"),
await untilCacheIs(
() => treeID.getAttributeValue("AXPopupValue"),
"true",
"Correct AXPopupValue after change for tree"
);
@ -240,8 +240,8 @@ addAccessibleTask(
.setAttribute("aria-haspopup", "true");
});
is(
gridID.getAttributeValue("AXPopupValue"),
await untilCacheIs(
() => gridID.getAttributeValue("AXPopupValue"),
"true",
"Correct AXPopupValue after change for grid"
);
@ -287,8 +287,8 @@ addAccessibleTask(
.setAttribute("aria-haspopup", "true");
});
is(
dialogID.getAttributeValue("AXPopupValue"),
await untilCacheIs(
() => dialogID.getAttributeValue("AXPopupValue"),
"true",
"Correct AXPopupValue after change for dialog"
);