Bug 1946061 - Call browserLoaded as early as possible r=asuth

browserLoaded depends on load events and thus it can hang for already loaded browser (bug 1949534).

Differential Revision: https://phabricator.services.mozilla.com/D238988
This commit is contained in:
Kagami Sascha Rosylight
2025-02-20 22:17:05 +00:00
parent 82feb88c17
commit 217fd47316

View File

@@ -60,13 +60,10 @@ add_task(async function no_tag_collision_between_containers() {
});
let browser2 = gBrowser.getBrowserForTab(tab2);
gBrowser.selectedTab = tab1;
tab1.ownerGlobal.focus();
await BrowserTestUtils.browserLoaded(browser1);
gBrowser.selectedTab = tab2;
tab2.ownerGlobal.focus();
await BrowserTestUtils.browserLoaded(browser2);
await Promise.all([
BrowserTestUtils.browserLoaded(browser1),
BrowserTestUtils.browserLoaded(browser2),
]);
// Open notifications on each tab with the same tag