From cb84cda02c8eddd648cc403fa53c35114872222c Mon Sep 17 00:00:00 2001 From: Sandor Molnar Date: Wed, 26 Oct 2022 15:01:23 +0300 Subject: [PATCH] Backed out changeset 53ce60b1b515 (bug 1797050) for causing bc failures in browser/components/preferences/tests/browser_extension_controlled.js CLOSED TREE --- .../browser_contextmenu_save_blocked.js | 2 +- .../browser_extension_sideloading.js | 2 +- .../components/colorways/tests/browser/head.js | 2 +- .../tests/browser/browser_colorways_card.js | 2 +- .../test/browser/browser_asrouter_targeting.js | 2 +- .../browser_browser_languages_subdialog.js | 4 ++-- .../tests/browser_extension_controlled.js | 18 +++++++++--------- .../test/browser/browser_protections_proxy.js | 2 +- .../browser_UsageTelemetry_interaction.js | 4 ++-- .../browser/browser_UsageTelemetry_toolbars.js | 2 +- services/sync/tests/unit/test_addons_engine.js | 2 +- .../sync/tests/unit/test_addons_reconciler.js | 2 +- services/sync/tests/unit/test_addons_store.js | 8 ++++---- .../sync/tests/unit/test_addons_tracker.js | 2 +- .../aboutprocesses/tests/browser/head.js | 4 +--- .../components/normandy/test/browser/head.js | 2 +- .../normandy/test/unit/test_addon_unenroll.js | 4 ++-- .../search/tests/SearchTestUtils.sys.mjs | 2 +- .../tests/xpcshell/test_override_allowlist.js | 2 +- .../test_webextensions_builtin_upgrade.js | 4 ++-- .../test_webextensions_startup_remove.js | 2 +- .../tests/xpcshell/test_webextensions_valid.js | 2 +- .../tests/unit/test_TelemetryEnvironment.js | 6 +++--- .../test_backgroundupdate_reason_schedule.js | 2 +- 24 files changed, 41 insertions(+), 43 deletions(-) diff --git a/browser/base/content/test/contextMenu/browser_contextmenu_save_blocked.js b/browser/base/content/test/contextMenu/browser_contextmenu_save_blocked.js index dbfc57d149b7..adde5c4435a3 100644 --- a/browser/base/content/test/contextMenu/browser_contextmenu_save_blocked.js +++ b/browser/base/content/test/contextMenu/browser_contextmenu_save_blocked.js @@ -22,7 +22,7 @@ function mockPromptService() { add_task(async function test_save_link_blocked_by_extension() { let ext = ExtensionTestUtils.loadExtension({ manifest: { - browser_specific_settings: { gecko: { id: "cancel@test" } }, + applications: { gecko: { id: "cancel@test" } }, name: "Cancel Test", permissions: ["webRequest", "webRequestBlocking", ""], }, diff --git a/browser/base/content/test/webextensions/browser_extension_sideloading.js b/browser/base/content/test/webextensions/browser_extension_sideloading.js index 958393336ffd..df8b13a5c291 100644 --- a/browser/base/content/test/webextensions/browser_extension_sideloading.js +++ b/browser/base/content/test/webextensions/browser_extension_sideloading.js @@ -17,7 +17,7 @@ const kSideloaded = true; async function createWebExtension(details) { let options = { manifest: { - browser_specific_settings: { gecko: { id: details.id } }, + applications: { gecko: { id: details.id } }, name: details.name, diff --git a/browser/components/colorways/tests/browser/head.js b/browser/components/colorways/tests/browser/head.js index 0b8a687845c1..db926b6c9983 100644 --- a/browser/components/colorways/tests/browser/head.js +++ b/browser/components/colorways/tests/browser/head.js @@ -73,7 +73,7 @@ function installTestTheme(id) { manifest: { name, description, - browser_specific_settings: { gecko: { id } }, + applications: { gecko: { id } }, theme: id === MOCK_DARK_THEME_ID ? { properties: { color_scheme: "dark" } } diff --git a/browser/components/firefoxview/tests/browser/browser_colorways_card.js b/browser/components/firefoxview/tests/browser/browser_colorways_card.js index 80a48ebd6543..5d131dea297f 100644 --- a/browser/components/firefoxview/tests/browser/browser_colorways_card.js +++ b/browser/components/firefoxview/tests/browser/browser_colorways_card.js @@ -63,7 +63,7 @@ async function createTempTheme(id) { const xpi = AddonTestUtils.createTempWebExtensionFile({ manifest: { name: "Monochromatic Theme", - browser_specific_settings: { gecko: { id } }, + applications: { gecko: { id } }, theme: {}, }, }); diff --git a/browser/components/newtab/test/browser/browser_asrouter_targeting.js b/browser/components/newtab/test/browser/browser_asrouter_targeting.js index 46c2a1475819..a9cb4ddba9c6 100644 --- a/browser/components/newtab/test/browser/browser_asrouter_targeting.js +++ b/browser/components/newtab/test/browser/browser_asrouter_targeting.js @@ -407,7 +407,7 @@ add_task(async function checkAddonsInfo() { const xpi = AddonTestUtils.createTempWebExtensionFile({ manifest: { - browser_specific_settings: { gecko: { id: FAKE_ID } }, + applications: { gecko: { id: FAKE_ID } }, name: FAKE_NAME, version: FAKE_VERSION, }, diff --git a/browser/components/preferences/tests/browser_browser_languages_subdialog.js b/browser/components/preferences/tests/browser_browser_languages_subdialog.js index 1572a8b57387..2747cd166882 100644 --- a/browser/components/preferences/tests/browser_browser_languages_subdialog.js +++ b/browser/components/preferences/tests/browser_browser_languages_subdialog.js @@ -29,10 +29,10 @@ function getManifestData(locale, version = "2.0") { version: "1", }, }, - browser_specific_settings: { + applications: { gecko: { - id: langpackId(locale), strict_min_version: AppConstants.MOZ_APP_VERSION, + id: langpackId(locale), strict_max_version: AppConstants.MOZ_APP_VERSION, }, }, diff --git a/browser/components/preferences/tests/browser_extension_controlled.js b/browser/components/preferences/tests/browser_extension_controlled.js index 81793ee9baaf..276227503d89 100644 --- a/browser/components/preferences/tests/browser_extension_controlled.js +++ b/browser/components/preferences/tests/browser_extension_controlled.js @@ -153,7 +153,7 @@ add_task(async function testExtensionControlledHomepage() { manifest: { version: "1.0", name: "set_homepage", - browser_specific_settings: { + applications: { gecko: { id: ADDON_ID, }, @@ -237,7 +237,7 @@ add_task(async function testExtensionControlledHomepage() { manifest: { version: "1.0", name: "second_set_homepage", - browser_specific_settings: { + applications: { gecko: { id: SECOND_ADDON_ID, }, @@ -411,7 +411,7 @@ add_task(async function testPrefLockedHomepage() { manifest: { version: "1.0", name: "set_homepage", - browser_specific_settings: { + applications: { gecko: { id: ADDON_ID, }, @@ -625,7 +625,7 @@ add_task(async function testExtensionControlledNewTab() { manifest: { version: "1.0", name: "set_newtab", - browser_specific_settings: { + applications: { gecko: { id: ADDON_ID, }, @@ -699,7 +699,7 @@ add_task(async function testExtensionControlledNewTab() { manifest: { version: "1.0", name: "second_set_newtab", - browser_specific_settings: { + applications: { gecko: { id: SECOND_ADDON_ID, }, @@ -787,7 +787,7 @@ add_task(async function testExtensionControlledWebNotificationsPermission() { name: "TestExtension", version: "1.0", description: "Testing WebNotificationsDisable", - browser_specific_settings: { gecko: { id: "@web_notifications_disable" } }, + applications: { gecko: { id: "@web_notifications_disable" } }, permissions: ["browserSettings"], browser_action: { default_title: "Testing", @@ -1021,7 +1021,7 @@ add_task(async function testExtensionControlledTrackingProtection() { useAddonManager: "permanent", manifest: { name: "set_tp", - browser_specific_settings: { gecko: { id: EXTENSION_ID } }, + applications: { gecko: { id: EXTENSION_ID } }, permissions: ["privacy"], }, background, @@ -1063,7 +1063,7 @@ add_task(async function testExtensionControlledPasswordManager() { name: "testPasswordManagerExtension", version: "1.0", description: "Testing rememberSignons", - browser_specific_settings: { gecko: { id: EXTENSION_ID } }, + applications: { gecko: { id: EXTENSION_ID } }, permissions: ["privacy"], browser_action: { default_title: "Testing rememberSignons", @@ -1342,7 +1342,7 @@ add_task(async function testExtensionControlledProxyConfig() { useAddonManager: "permanent", manifest: { name: "set_proxy", - browser_specific_settings: { gecko: { id: EXTENSION_ID } }, + applications: { gecko: { id: EXTENSION_ID } }, permissions: ["proxy"], }, background, diff --git a/browser/components/protections/test/browser/browser_protections_proxy.js b/browser/components/protections/test/browser/browser_protections_proxy.js index 34663c88cf98..5db6c05d5c84 100644 --- a/browser/components/protections/test/browser/browser_protections_proxy.js +++ b/browser/components/protections/test/browser/browser_protections_proxy.js @@ -72,7 +72,7 @@ add_task(async function() { const id = "secure-proxy@mozilla.com"; const extension = ExtensionTestUtils.loadExtension({ manifest: { - browser_specific_settings: { gecko: { id } }, + applications: { gecko: { id } }, name: "Firefox Proxy", }, useAddonManager: "temporary", diff --git a/browser/modules/test/browser/browser_UsageTelemetry_interaction.js b/browser/modules/test/browser/browser_UsageTelemetry_interaction.js index f1ab71319578..aba1f109c7c9 100644 --- a/browser/modules/test/browser/browser_UsageTelemetry_interaction.js +++ b/browser/modules/test/browser/browser_UsageTelemetry_interaction.js @@ -320,7 +320,7 @@ add_task(async function webextension() { const extension = ExtensionTestUtils.loadExtension({ manifest: { version: "1", - browser_specific_settings: { + applications: { gecko: { id: "random_addon@example.com" }, }, browser_action: { @@ -410,7 +410,7 @@ add_task(async function webextension() { const extension2 = ExtensionTestUtils.loadExtension({ manifest: { version: "1", - browser_specific_settings: { + applications: { gecko: { id: "random_addon2@example.com" }, }, browser_action: { diff --git a/browser/modules/test/browser/browser_UsageTelemetry_toolbars.js b/browser/modules/test/browser/browser_UsageTelemetry_toolbars.js index a07a506b2e72..16d00d1e62ec 100644 --- a/browser/modules/test/browser/browser_UsageTelemetry_toolbars.js +++ b/browser/modules/test/browser/browser_UsageTelemetry_toolbars.js @@ -409,7 +409,7 @@ add_task(async function extensions() { useAddonManager: "temporary", manifest: { version: "1", - browser_specific_settings: { + applications: { gecko: { id: "random_addon@example.com" }, }, browser_action: { diff --git a/services/sync/tests/unit/test_addons_engine.js b/services/sync/tests/unit/test_addons_engine.js index e33d3e1606ae..39bf17962e30 100644 --- a/services/sync/tests/unit/test_addons_engine.js +++ b/services/sync/tests/unit/test_addons_engine.js @@ -36,7 +36,7 @@ const XPI = AddonTestUtils.createTempWebExtensionFile({ manifest: { name: "Test 1", description: "Test Description", - browser_specific_settings: { gecko: { id: ADDON_ID } }, + applications: { gecko: { id: ADDON_ID } }, }, }); diff --git a/services/sync/tests/unit/test_addons_reconciler.js b/services/sync/tests/unit/test_addons_reconciler.js index 98d2d4bef7b8..0284500fbe2c 100644 --- a/services/sync/tests/unit/test_addons_reconciler.js +++ b/services/sync/tests/unit/test_addons_reconciler.js @@ -27,7 +27,7 @@ const XPI = AddonTestUtils.createTempWebExtensionFile({ manifest: { name: "Test 1", description: "Test Description", - browser_specific_settings: { gecko: { id: ADDON_ID } }, + applications: { gecko: { id: ADDON_ID } }, }, }); diff --git a/services/sync/tests/unit/test_addons_store.js b/services/sync/tests/unit/test_addons_store.js index 129c048aff5e..da79a4c63da3 100644 --- a/services/sync/tests/unit/test_addons_store.js +++ b/services/sync/tests/unit/test_addons_store.js @@ -51,7 +51,7 @@ add_task(async function setupSystemAddon() { let xpi = await AddonTestUtils.createTempWebExtensionFile({ manifest: { - browser_specific_settings: { gecko: { id: SYSTEM_ADDON_ID } }, + applications: { gecko: { id: SYSTEM_ADDON_ID } }, }, }); @@ -68,7 +68,7 @@ const ID3 = "addon3@tests.mozilla.org"; const ADDONS = { test_addon1: { manifest: { - browser_specific_settings: { + applications: { gecko: { id: ID1, update_url: "http://example.com/data/test_install.json", @@ -79,13 +79,13 @@ const ADDONS = { test_addon2: { manifest: { - browser_specific_settings: { gecko: { id: ID2 } }, + applications: { gecko: { id: ID2 } }, }, }, test_addon3: { manifest: { - browser_specific_settings: { + applications: { gecko: { id: ID3, strict_max_version: "0", diff --git a/services/sync/tests/unit/test_addons_tracker.js b/services/sync/tests/unit/test_addons_tracker.js index c2d78da266fb..7c1ba811db34 100644 --- a/services/sync/tests/unit/test_addons_tracker.js +++ b/services/sync/tests/unit/test_addons_tracker.js @@ -31,7 +31,7 @@ const addon1ID = "addon1@tests.mozilla.org"; const ADDONS = { test_addon1: { manifest: { - browser_specific_settings: { gecko: { id: addon1ID } }, + applications: { gecko: { id: addon1ID } }, }, }, }; diff --git a/toolkit/components/aboutprocesses/tests/browser/head.js b/toolkit/components/aboutprocesses/tests/browser/head.js index 7f67bad321cf..280bce30fdcf 100644 --- a/toolkit/components/aboutprocesses/tests/browser/head.js +++ b/toolkit/components/aboutprocesses/tests/browser/head.js @@ -421,9 +421,7 @@ async function testAboutProcessesWithConfig({ showAllFrames, showThreads }) { // extension process. const extension = ExtensionTestUtils.loadExtension({ manifest: { - browser_specific_settings: { - gecko: { id: "test-aboutprocesses@mochi.test" }, - }, + applications: { gecko: { id: "test-aboutprocesses@mochi.test" } }, }, background() { // Creates an about:blank iframe in the extension process to make sure that diff --git a/toolkit/components/normandy/test/browser/head.js b/toolkit/components/normandy/test/browser/head.js index bbaa88cb111a..cae81c6e7457 100644 --- a/toolkit/components/normandy/test/browser/head.js +++ b/toolkit/components/normandy/test/browser/head.js @@ -75,7 +75,7 @@ this.withWebExtension = function( name: "normandy_fixture", version: "1.0", description: "Dummy test fixture that's a webextension", - browser_specific_settings: { + applications: { gecko: { id: addonId }, }, }, diff --git a/toolkit/components/normandy/test/unit/test_addon_unenroll.js b/toolkit/components/normandy/test/unit/test_addon_unenroll.js index fb3826ab70a3..aa9f4d4332bd 100644 --- a/toolkit/components/normandy/test/unit/test_addon_unenroll.js +++ b/toolkit/components/normandy/test/unit/test_addon_unenroll.js @@ -58,7 +58,7 @@ decorate_task( manifest: { version: "1.0", - browser_specific_settings: { + applications: { gecko: { id: ID }, }, @@ -227,7 +227,7 @@ decorate_task( manifest: { version: "1.0", - browser_specific_settings: { + applications: { gecko: { id: ID }, }, }, diff --git a/toolkit/components/search/tests/SearchTestUtils.sys.mjs b/toolkit/components/search/tests/SearchTestUtils.sys.mjs index 8492d8ffc267..ca9e2b7c727c 100644 --- a/toolkit/components/search/tests/SearchTestUtils.sys.mjs +++ b/toolkit/components/search/tests/SearchTestUtils.sys.mjs @@ -305,7 +305,7 @@ export var SearchTestUtils = { options.version = options.version ?? "1.0"; let manifest = { version: options.version, - browser_specific_settings: { + applications: { gecko: { id: options.id, }, diff --git a/toolkit/components/search/tests/xpcshell/test_override_allowlist.js b/toolkit/components/search/tests/xpcshell/test_override_allowlist.js index d5fe2df4e071..28536b2b2182 100644 --- a/toolkit/components/search/tests/xpcshell/test_override_allowlist.js +++ b/toolkit/components/search/tests/xpcshell/test_override_allowlist.js @@ -272,7 +272,7 @@ add_task(async function setup() { baseExtension = ExtensionTestUtils.loadExtension({ manifest: { - browser_specific_settings: { + applications: { gecko: { id: "test@thirdparty.example.com", }, diff --git a/toolkit/components/search/tests/xpcshell/test_webextensions_builtin_upgrade.js b/toolkit/components/search/tests/xpcshell/test_webextensions_builtin_upgrade.js index 41a7c0c0b27f..fc2c6f2944f6 100644 --- a/toolkit/components/search/tests/xpcshell/test_webextensions_builtin_upgrade.js +++ b/toolkit/components/search/tests/xpcshell/test_webextensions_builtin_upgrade.js @@ -44,7 +44,7 @@ function makePlainExtension(version, name = "Plain") { manifest: { name, version, - browser_specific_settings: { + applications: { gecko: { id: "plainengine@search.mozilla.org", }, @@ -102,7 +102,7 @@ function makeMultiLocaleExtension(version) { manifest: { name: "__MSG_searchName__", version, - browser_specific_settings: { + applications: { gecko: { id: "multilocale@search.mozilla.org", }, diff --git a/toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js b/toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js index 0b55bca424c7..52024e8c6df5 100644 --- a/toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js +++ b/toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js @@ -12,7 +12,7 @@ add_task(async function setup() { xpi = AddonTestUtils.createTempWebExtensionFile({ manifest: { version: "1.0", - browser_specific_settings: { + applications: { gecko: { id: ENGINE_ID }, }, chrome_settings_overrides: { diff --git a/toolkit/components/search/tests/xpcshell/test_webextensions_valid.js b/toolkit/components/search/tests/xpcshell/test_webextensions_valid.js index 05d8b90313ae..ad89aa3f4dc1 100644 --- a/toolkit/components/search/tests/xpcshell/test_webextensions_valid.js +++ b/toolkit/components/search/tests/xpcshell/test_webextensions_valid.js @@ -99,7 +99,7 @@ add_task(async function test_extension_no_longer_specifies_engine() { useAddonManager: "permanent", manifest: { version: "2.0", - browser_specific_settings: { + applications: { gecko: { id: "example@tests.mozilla.org", }, diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js index 993d59fc5917..263f36c885c1 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js @@ -518,7 +518,7 @@ add_task(async function test_addonsWatch_NotInterestingChange() { let themeXpi = AddonTestUtils.createTempWebExtensionFile({ manifest: { theme: {}, - browser_specific_settings: { gecko: { id: THEME_ID } }, + applications: { gecko: { id: THEME_ID } }, }, }); let themeAddon = (await AddonTestUtils.promiseInstallFile(themeXpi)).addon; @@ -526,7 +526,7 @@ add_task(async function test_addonsWatch_NotInterestingChange() { let dictXpi = AddonTestUtils.createTempWebExtensionFile({ manifest: { dictionaries: {}, - browser_specific_settings: { gecko: { id: DICT_ID } }, + applications: { gecko: { id: DICT_ID } }, }, }); let dictAddon = (await AddonTestUtils.promiseInstallFile(dictXpi)).addon; @@ -637,7 +637,7 @@ add_task(async function test_addons() { name: "XPI Telemetry WebExtension Add-on Test", description: "A webextension addon.", version: "1.0", - browser_specific_settings: { + applications: { gecko: { id: WEBEXTENSION_ADDON_ID, }, diff --git a/toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_reason_schedule.js b/toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_reason_schedule.js index 61b1f5725272..dccfae440c3c 100644 --- a/toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_reason_schedule.js +++ b/toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_reason_schedule.js @@ -55,7 +55,7 @@ add_task( name: "test Language Pack", version: "1.0", manifest_version: 2, - browser_specific_settings: { + applications: { gecko: { id: "@test-langpack", strict_min_version: "42.0",