diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /browser/components/urlbar/tests/quicksuggest/MerinoTestUtils.sys.mjs | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/urlbar/tests/quicksuggest/MerinoTestUtils.sys.mjs')
-rw-r--r-- | browser/components/urlbar/tests/quicksuggest/MerinoTestUtils.sys.mjs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/browser/components/urlbar/tests/quicksuggest/MerinoTestUtils.sys.mjs b/browser/components/urlbar/tests/quicksuggest/MerinoTestUtils.sys.mjs index 6cda9bb9a7..1828ddbceb 100644 --- a/browser/components/urlbar/tests/quicksuggest/MerinoTestUtils.sys.mjs +++ b/browser/components/urlbar/tests/quicksuggest/MerinoTestUtils.sys.mjs @@ -355,20 +355,16 @@ class _MerinoTestUtils { lazy.QuickSuggest.weather._test_fetchIntervalMs = WEATHER_FETCH_INTERVAL_MS; - // Enabling weather will trigger a fetch. Wait for it to finish so the - // suggestion is ready when this function returns. - this.info("MockMerinoServer initializing weather, waiting for fetch"); - let fetchPromise = lazy.QuickSuggest.weather.waitForFetches(); + // Enabling weather will trigger a fetch. Queue another fetch and await it + // so no fetches are ongoing when this function returns. + this.info("MockMerinoServer initializing weather, setting prefs"); lazy.UrlbarPrefs.set("weather.featureGate", true); lazy.UrlbarPrefs.set("suggest.weather", true); - await fetchPromise; - this.info("MockMerinoServer initializing weather, got fetch"); - - this.Assert.equal( - lazy.QuickSuggest.weather._test_pendingFetchCount, - 0, - "No pending fetches after awaiting initial fetch" + this.info( + "MockMerinoServer initializing weather, done setting prefs, starting fetch" ); + await lazy.QuickSuggest.weather._test_fetch(); + this.info("MockMerinoServer initializing weather, done awaiting fetch"); this.registerCleanupFunction?.(async () => { lazy.UrlbarPrefs.clear("weather.featureGate"); |