summaryrefslogtreecommitdiffstats
path: root/toolkit/components/search/tests/xpcshell/test_missing_engine.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/search/tests/xpcshell/test_missing_engine.js')
-rw-r--r--toolkit/components/search/tests/xpcshell/test_missing_engine.js59
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,
},
});