diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /toolkit/components/search/tests/xpcshell/test_missing_engine.js | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/search/tests/xpcshell/test_missing_engine.js')
-rw-r--r-- | toolkit/components/search/tests/xpcshell/test_missing_engine.js | 59 |
1 files changed, 6 insertions, 53 deletions
diff --git a/toolkit/components/search/tests/xpcshell/test_missing_engine.js b/toolkit/components/search/tests/xpcshell/test_missing_engine.js index 259baf9c1a..496397790e 100644 --- a/toolkit/components/search/tests/xpcshell/test_missing_engine.js +++ b/toolkit/components/search/tests/xpcshell/test_missing_engine.js @@ -2,7 +2,8 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ // This test is designed to check the search service keeps working if there's -// a built-in engine missing from the configuration. +// an application provided WebExtension missing that is referenced from the +// configuration. Only applies to the old search configuration. "use strict"; @@ -55,64 +56,16 @@ const BAD_CONFIG = [ }, ]; -const CONFIG_V2 = [ - { - recordType: "engine", - identifier: "engine", - base: { - name: "Test search engine", - urls: { - search: { - base: "https://www.google.com/search", - params: [ - { - name: "channel", - searchAccessPoint: { - addressbar: "fflb", - contextmenu: "rcs", - }, - }, - ], - searchTermParamName: "q", - }, - suggestions: { - base: "https://suggestqueries.google.com/complete/search?output=firefox&client=firefox&hl={moz:locale}", - searchTermParamName: "q", - }, - }, - }, - variants: [ - { - environment: { allRegionsAndLocales: true }, - }, - ], - }, - { - recordType: "defaultEngines", - specificDefaults: [], - }, - { - recordType: "engineOrders", - orders: [], - }, -]; - add_setup(async function () { SearchTestUtils.useMockIdleService(); await AddonTestUtils.promiseStartupManager(); // This test purposely attempts to load a missing engine. - consoleAllowList.push( - "Could not load engine engine-missing@search.mozilla.org" - ); + consoleAllowList.push("Could not load engine"); }); add_task(async function test_startup_with_missing() { - await SearchTestUtils.useTestEngines( - "data", - null, - SearchUtils.newSearchConfigEnabled ? CONFIG_V2 : BAD_CONFIG - ); + await SearchTestUtils.useTestEngines("data", null, BAD_CONFIG); const result = await Services.search.init(); Assert.ok( @@ -135,7 +88,7 @@ add_task(async function test_update_with_missing() { await RemoteSettings(SearchUtils.SETTINGS_KEY).emit("sync", { data: { - current: SearchUtils.newSearchConfigEnabled ? CONFIG_V2 : GOOD_CONFIG, + current: GOOD_CONFIG, }, }); @@ -156,7 +109,7 @@ add_task(async function test_update_with_missing() { await RemoteSettings(SearchUtils.SETTINGS_KEY).emit("sync", { data: { - current: SearchUtils.newSearchConfigEnabled ? CONFIG_V2 : BAD_CONFIG, + current: BAD_CONFIG, }, }); |