Bug 1775918 - Fix intermittent failure in browser/components/search/test/browser/browser_searchbar_enter.js. r=search-reviewers,Standard8

Differential Revision: https://phabricator.services.mozilla.com/D220574
This commit is contained in:
Moritz Beier
2024-09-02 09:58:06 +00:00
parent dd7b47ccb6
commit ca56f68246

View File

@@ -184,10 +184,11 @@ add_task(async function openSettingsWithEnter() {
const searchButton = searchBar.querySelector(".searchbar-search-button");
let shownPromise = promiseEvent(searchPopup, "popupshown");
info("Clicking icon");
let builtPromise = promiseEvent(searchPopup.oneOffButtons, "rebuild");
info("Opening search panel");
EventUtils.synthesizeMouseAtCenter(searchButton, {}, win);
await shownPromise;
info("Popup shown");
await Promise.all([shownPromise, builtPromise]);
info("Search panel ready");
EventUtils.synthesizeKey("KEY_ArrowUp", {}, win);