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/unit/test_UrlbarSearchUtils.js | |
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/unit/test_UrlbarSearchUtils.js')
-rw-r--r-- | browser/components/urlbar/tests/unit/test_UrlbarSearchUtils.js | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/browser/components/urlbar/tests/unit/test_UrlbarSearchUtils.js b/browser/components/urlbar/tests/unit/test_UrlbarSearchUtils.js index fe33228007..28cbd381f1 100644 --- a/browser/components/urlbar/tests/unit/test_UrlbarSearchUtils.js +++ b/browser/components/urlbar/tests/unit/test_UrlbarSearchUtils.js @@ -65,14 +65,10 @@ add_task(async function onlyEnabled_option_nomatch() { let domain = engine.searchUrlDomain; let token = domain.substr(0, 1); engine.hideOneOffButton = true; - let matchedEngines = await UrlbarSearchUtils.enginesForDomainPrefix(token, { - onlyEnabled: true, - }); + let matchedEngines = await UrlbarSearchUtils.enginesForDomainPrefix(token); Assert.notEqual(matchedEngines[0].searchUrlDomain, domain); engine.hideOneOffButton = false; - matchedEngines = await UrlbarSearchUtils.enginesForDomainPrefix(token, { - onlyEnabled: true, - }); + matchedEngines = await UrlbarSearchUtils.enginesForDomainPrefix(token); Assert.equal(matchedEngines[0].searchUrlDomain, domain); }); @@ -95,7 +91,7 @@ add_task(async function add_search_engine_match() { Assert.ok(matchedEngine); Assert.equal(matchedEngine.searchForm, "https://www.bacon.moz"); Assert.equal(matchedEngine.name, "bacon"); - Assert.equal(matchedEngine.getIconURL(), null); + Assert.equal(await matchedEngine.getIconURL(), null); info("also type part of the public suffix"); matchedEngine = ( await UrlbarSearchUtils.enginesForDomainPrefix("bacon.m") @@ -103,7 +99,7 @@ add_task(async function add_search_engine_match() { Assert.ok(matchedEngine); Assert.equal(matchedEngine.searchForm, "https://www.bacon.moz"); Assert.equal(matchedEngine.name, "bacon"); - Assert.equal(matchedEngine.getIconURL(), null); + Assert.equal(await matchedEngine.getIconURL(), null); }); add_task(async function match_multiple_search_engines() { @@ -134,19 +130,19 @@ add_task(async function test_aliased_search_engine_match() { Assert.ok(matchedEngine); Assert.equal(matchedEngine.name, "bacon"); Assert.ok(matchedEngine.aliases.includes("pork")); - Assert.equal(matchedEngine.getIconURL(), null); + Assert.equal(await matchedEngine.getIconURL(), null); // Upper case matchedEngine = await UrlbarSearchUtils.engineForAlias("PORK"); Assert.ok(matchedEngine); Assert.equal(matchedEngine.name, "bacon"); Assert.ok(matchedEngine.aliases.includes("pork")); - Assert.equal(matchedEngine.getIconURL(), null); + Assert.equal(await matchedEngine.getIconURL(), null); // Cap case matchedEngine = await UrlbarSearchUtils.engineForAlias("Pork"); Assert.ok(matchedEngine); Assert.equal(matchedEngine.name, "bacon"); Assert.ok(matchedEngine.aliases.includes("pork")); - Assert.equal(matchedEngine.getIconURL(), null); + Assert.equal(await matchedEngine.getIconURL(), null); }); add_task(async function test_aliased_search_engine_match_upper_case_alias() { @@ -164,19 +160,19 @@ add_task(async function test_aliased_search_engine_match_upper_case_alias() { Assert.ok(matchedEngine); Assert.equal(matchedEngine.name, "patch"); Assert.ok(matchedEngine.aliases.includes("PR")); - Assert.equal(matchedEngine.getIconURL(), null); + Assert.equal(await matchedEngine.getIconURL(), null); // Upper case matchedEngine = await UrlbarSearchUtils.engineForAlias("PR"); Assert.ok(matchedEngine); Assert.equal(matchedEngine.name, "patch"); Assert.ok(matchedEngine.aliases.includes("PR")); - Assert.equal(matchedEngine.getIconURL(), null); + Assert.equal(await matchedEngine.getIconURL(), null); // Cap case matchedEngine = await UrlbarSearchUtils.engineForAlias("Pr"); Assert.ok(matchedEngine); Assert.equal(matchedEngine.name, "patch"); Assert.ok(matchedEngine.aliases.includes("PR")); - Assert.equal(matchedEngine.getIconURL(), null); + Assert.equal(await matchedEngine.getIconURL(), null); }); add_task(async function remove_search_engine_nomatch() { |