Commit 358efd0f authored by Dale Harvey's avatar Dale Harvey
Browse files

Bug 1641288 - Ensure engines have reloaded during tests. r=Standard8, a=test-only

Differential Revision: https://phabricator.services.mozilla.com/D77659
parent 4a9107ad
......@@ -33,7 +33,11 @@ add_task(async function setup() {
add_task(async function async_init() {
let commitPromise = promiseAfterCache();
let enginesReloaded = SearchTestUtils.promiseSearchNotification(
"engines-reloaded"
);
await Services.search.init(true);
await enginesReloaded;
let engines = await Services.search.getEngines();
Assert.equal(engines.length, 1);
......@@ -74,7 +78,11 @@ add_task(async function invalid_engine() {
.getDefaultBranch(SearchUtils.BROWSER_SEARCH_PREF)
.setCharPref(kUrlPref, url);
let enginesReloaded = SearchTestUtils.promiseSearchNotification(
"engines-reloaded"
);
await asyncReInit({ awaitRegionFetch: true });
await enginesReloaded;
let engines = await Services.search.getEngines();
Assert.equal(engines.length, 2);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment