Bug 1881181 - Wait for mac accessible to be destroyed properly. r=morgan

Not yet 100% sure why my CSS change caused the timing to be different,
but this should be reasonable?

Differential Revision: https://phabricator.services.mozilla.com/D202299
This commit is contained in:
Emilio Cobos Álvarez 2024-02-21 16:11:02 +00:00
parent 67a3110855
commit 837028a288

View File

@ -206,8 +206,10 @@ add_task(async () => {
is(rootChildCount(), baseRootChildCount + 1, "Root has another child");
// Close popup
let hide = waitForMacEvent("AXUIElementDestroyed");
EventUtils.synthesizeKey("KEY_Escape");
await BrowserTestUtils.waitForPopupEvent(identityPopup, "hidden");
await hide;
// We're back to the base child count
is(rootChildCount(), baseRootChildCount, "Root has the base child count");