Bug 1797050 - Part 3 - Use `browser_specific_settings` instead of `applications` in existing WebExt tests. r=rpl,geckoview-reviewers,extension-reviewers,owlish

We want to encourage extension developers to use `browser_specific_settings` instead of `applications`,
which will be unsupported in Manifest Version 3+. This patch prepares the introduction of a new warning
(that is usually converted into an error in the test environment).

Differential Revision: https://phabricator.services.mozilla.com/D160059
This commit is contained in:
William Durand 2022-10-28 09:53:09 +00:00
Родитель db152653ff
Коммит 64e8f3272d
226 изменённых файлов: 690 добавлений и 628 удалений

Просмотреть файл

@ -59,7 +59,7 @@ add_task(async function testExtensionControlledPopup() {
let id = "ext-controlled@mochi.test";
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id } },
browser_specific_settings: { gecko: { id } },
name: "Ext Controlled",
},
// We need to be able to find the extension using AddonManager.

Просмотреть файл

@ -109,7 +109,7 @@ add_task(async function test_addon_debugging_netmonitor_panel() {
useAddonManager: "temporary",
manifest: {
permissions: ["http://mochi.test/"],
applications: {
browser_specific_settings: {
gecko: { id: EXTENSION_ID },
},
},

Просмотреть файл

@ -180,7 +180,7 @@ add_task(async function browseraction_contextmenu_manage_extension() {
let buttonId = `${makeWidgetId(id)}-browser-action`;
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: { id },
},
browser_action: {},
@ -457,7 +457,7 @@ add_task(async function browseraction_contextmenu_remove_extension() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
name,
applications: {
browser_specific_settings: {
gecko: { id },
},
browser_action: {},
@ -602,7 +602,7 @@ add_task(async function browseraction_contextmenu_report_extension() {
manifest: {
name,
author: "Bad author",
applications: {
browser_specific_settings: {
gecko: { id },
},
browser_action: {},

Просмотреть файл

@ -60,7 +60,7 @@ add_task(async function testBrowserActionTelemetryTiming() {
...extensionOptions,
manifest: {
...extensionOptions.manifest,
applications: {
browser_specific_settings: {
gecko: { id: EXTENSION_ID1 },
},
},
@ -69,7 +69,7 @@ add_task(async function testBrowserActionTelemetryTiming() {
...extensionOptions,
manifest: {
...extensionOptions.manifest,
applications: {
browser_specific_settings: {
gecko: { id: EXTENSION_ID2 },
},
},
@ -208,7 +208,7 @@ add_task(async function testBrowserActionTelemetryTiming() {
add_task(async function testBrowserActionTelemetryResults() {
let extensionOptions = {
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: EXTENSION_ID1 },
},
browser_action: {

Просмотреть файл

@ -279,7 +279,7 @@ add_task(async function test_disable() {
let ext1 = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: ID,
},
@ -453,7 +453,7 @@ add_task(async function test_doorhanger_new_window() {
let ext1 = ExtensionTestUtils.loadExtension({
manifest: {
chrome_settings_overrides: { homepage: "ext1.html" },
applications: {
browser_specific_settings: {
gecko: { id: ext1Id },
},
name: "Ext1",
@ -638,7 +638,7 @@ add_task(async function test_overriding_home_page_incognito_spanning() {
manifest: {
chrome_settings_overrides: { homepage: "home.html" },
name: "private extension",
applications: {
browser_specific_settings: {
gecko: { id: "@spanning-home" },
},
},
@ -728,7 +728,7 @@ async function _test_overriding_home_page_open(manifest_version) {
manifest_version,
chrome_settings_overrides: { homepage: "home.html" },
name: "homepage provider",
applications: {
browser_specific_settings: {
gecko: { id: "homepage@mochitest" },
},
},

Просмотреть файл

@ -387,7 +387,7 @@ add_task(async function test_commands_event_page() {
let extension = ExtensionTestUtils.loadExtension({
useAddonManager: "permanent",
manifest: {
applications: { gecko: { id: "eventpage@commands" } },
browser_specific_settings: { gecko: { id: "eventpage@commands" } },
background: { persistent: false },
commands: {
"toggle-feature": {

Просмотреть файл

@ -65,7 +65,7 @@ add_task(async function test_update_defined_command() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: { gecko: { id: "commands@mochi.test" } },
browser_specific_settings: { gecko: { id: "commands@mochi.test" } },
commands: {
foo: {
suggested_key: {
@ -341,7 +341,7 @@ add_task(async function test_update_defined_command() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: { gecko: { id: "commands@mochi.test" } },
browser_specific_settings: { gecko: { id: "commands@mochi.test" } },
commands: {
foo: {
suggested_key: {

Просмотреть файл

@ -251,7 +251,7 @@ add_task(async function test_devtools_page_panels_create() {
useAddonManager: "temporary",
manifest: {
devtools_page: "devtools_page.html",
applications: {
browser_specific_settings: {
gecko: { id: EXTENSION_ID },
},
},

Просмотреть файл

@ -82,7 +82,7 @@ add_task(async function testIdentityIndicationNewTab() {
},
manifest: {
name: "Test Extension",
applications: {
browser_specific_settings: {
gecko: {
id: "@newtab",
},

Просмотреть файл

@ -52,7 +52,7 @@ add_task(async function test_management_install() {
manifest_version: 2,
name: "Tigers Matter",
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: "tiger@persona.beard",
},
@ -75,7 +75,7 @@ add_task(async function test_management_install() {
manifest_version: 2,
name: "Tigers Don't Matter",
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: "other@web.extension",
},

Просмотреть файл

@ -137,11 +137,11 @@ async function testShowHideEvent({
await BrowserTestUtils.switchTab(gBrowser, testTab);
}
let useAddonManager, applications;
let useAddonManager, browser_specific_settings;
const action = manifest_version < 3 ? "browser_action" : "action";
// hook up AOM so event pages in MV3 work.
if (manifest_version > 2) {
applications = { gecko: { id } };
browser_specific_settings = { gecko: { id } };
useAddonManager = "temporary";
}
let extension = ExtensionTestUtils.loadExtension({
@ -149,7 +149,7 @@ async function testShowHideEvent({
useAddonManager,
manifest: {
manifest_version,
applications,
browser_specific_settings,
page_action: {},
[action]: {
default_popup: "popup.html",

Просмотреть файл

@ -23,7 +23,7 @@ add_task(async function test_no_show_hide_for_private_window() {
let pb_extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: "@private-allowed" },
},
permissions: ["menus", "tabs"],
@ -34,7 +34,7 @@ add_task(async function test_no_show_hide_for_private_window() {
let extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: "@not-allowed" },
},
permissions: ["menus", "tabs"],

Просмотреть файл

@ -188,7 +188,7 @@ add_task(async function overrideContext_with_context() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: "@menu-test-extension" } },
browser_specific_settings: { gecko: { id: "@menu-test-extension" } },
permissions: ["menus", "menus.overrideContext", "tabs", "bookmarks"],
},
files: {
@ -248,7 +248,7 @@ add_task(async function overrideContext_with_context() {
let otherExtension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: "@other-test-extension" } },
browser_specific_settings: { gecko: { id: "@other-test-extension" } },
permissions: ["menus", "bookmarks", "activeTab"],
},
background,

Просмотреть файл

@ -377,7 +377,7 @@ add_task(async function test_omnibox_event_page() {
let extension = ExtensionTestUtils.loadExtension({
useAddonManager: "permanent",
manifest: {
applications: { gecko: { id: "eventpage@omnibox" } },
browser_specific_settings: { gecko: { id: "eventpage@omnibox" } },
omnibox: {
keyword: keyword,
},

Просмотреть файл

@ -52,7 +52,7 @@ add_task(async function test_tab_options_privileges() {
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
permissions: ["tabs"],
options_ui: {
page: "options.html",

Просмотреть файл

@ -42,7 +42,7 @@ add_task(async function testPageActionTelemetry() {
...extensionOptions,
manifest: {
...extensionOptions.manifest,
applications: {
browser_specific_settings: {
gecko: { id: EXTENSION_ID1 },
},
},
@ -51,7 +51,7 @@ add_task(async function testPageActionTelemetry() {
...extensionOptions,
manifest: {
...extensionOptions.manifest,
applications: {
browser_specific_settings: {
gecko: { id: EXTENSION_ID2 },
},
},

Просмотреть файл

@ -70,7 +70,9 @@ add_task(async function run_test_inline_options() {
let extension = await loadExtension({
manifest: {
applications: { gecko: { id: "inline_options@tests.mozilla.org" } },
browser_specific_settings: {
gecko: { id: "inline_options@tests.mozilla.org" },
},
options_ui: {
page: "options.html",
},
@ -268,7 +270,9 @@ add_task(async function test_tab_options() {
let extension = await loadExtension({
manifest: {
applications: { gecko: { id: "tab_options@tests.mozilla.org" } },
browser_specific_settings: {
gecko: { id: "tab_options@tests.mozilla.org" },
},
options_ui: {
page: "options.html",
open_in_tab: true,
@ -413,7 +417,9 @@ add_task(async function test_options_no_manifest() {
let extension = await loadExtension({
manifest: {
applications: { gecko: { id: "no_options@tests.mozilla.org" } },
browser_specific_settings: {
gecko: { id: "no_options@tests.mozilla.org" },
},
},
async background() {

Просмотреть файл

@ -48,7 +48,7 @@ add_task(async function test_inline_options_uninstall() {
let extension = await loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: "inline_options_uninstall@tests.mozilla.org" },
},
options_ui: {

Просмотреть файл

@ -9,7 +9,7 @@ let { ExtensionTestCommon } = ChromeUtils.import(
async function makeAndInstallXPI(id, backgroundScript, loadedURL) {
let xpi = ExtensionTestCommon.generateXPI({
manifest: { applications: { gecko: { id } } },
manifest: { browser_specific_settings: { gecko: { id } } },
background: backgroundScript,
});
SimpleTest.registerCleanupFunction(function cleanupXPI() {

Просмотреть файл

@ -10,7 +10,7 @@ add_task(async function test_sessions_tab_value_private() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "exampleextension@mozilla.org",
},

Просмотреть файл

@ -200,7 +200,7 @@ add_task(async function test_sessions_event_page() {
let extension = ExtensionTestUtils.loadExtension({
useAddonManager: "permanent",
manifest: {
applications: { gecko: { id: "eventpage@sessions" } },
browser_specific_settings: { gecko: { id: "eventpage@sessions" } },
permissions: ["sessions", "tabs"],
background: { persistent: false },
},

Просмотреть файл

@ -99,7 +99,7 @@ add_task(async function test_sessions_tab_value() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "exampleextension@mozilla.org",
},
@ -208,7 +208,7 @@ add_task(async function test_sessions_tab_value_persistence() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "exampleextension@mozilla.org",
},
@ -322,7 +322,7 @@ add_task(async function test_sessions_window_value() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "exampleextension@mozilla.org",
},
@ -379,7 +379,7 @@ add_task(async function test_sessions_window_value_persistence() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "exampleextension@mozilla.org",
},

Просмотреть файл

@ -206,7 +206,7 @@ add_task(async function test_extension_setting_default_engine_external() {
async function startExtension(win = window) {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION1_ID,
},
@ -529,7 +529,7 @@ add_task(async function test_user_changing_default_engine() {
add_task(async function test_user_change_with_disabling() {
let ext1 = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION1_ID,
},
@ -602,7 +602,7 @@ add_task(async function test_user_change_with_disabling() {
add_task(async function test_two_addons_with_first_disabled_before_second() {
let ext1 = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION1_ID,
},
@ -620,7 +620,7 @@ add_task(async function test_two_addons_with_first_disabled_before_second() {
let ext2 = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION2_ID,
},
@ -690,7 +690,7 @@ add_task(async function test_two_addons_with_first_disabled_before_second() {
add_task(async function test_two_addons_with_first_disabled() {
let ext1 = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION1_ID,
},
@ -708,7 +708,7 @@ add_task(async function test_two_addons_with_first_disabled() {
let ext2 = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION2_ID,
},
@ -778,7 +778,7 @@ add_task(async function test_two_addons_with_first_disabled() {
add_task(async function test_two_addons_with_second_disabled() {
let ext1 = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION1_ID,
},
@ -796,7 +796,7 @@ add_task(async function test_two_addons_with_second_disabled() {
let ext2 = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION2_ID,
},

Просмотреть файл

@ -726,7 +726,7 @@ add_task(async function test_tabs_event_page() {
let extension = ExtensionTestUtils.loadExtension({
useAddonManager: "permanent",
manifest: {
applications: { gecko: { id: "eventpage@tabs" } },
browser_specific_settings: { gecko: { id: "eventpage@tabs" } },
permissions: ["tabs"],
background: { persistent: false },
},

Просмотреть файл

@ -50,7 +50,7 @@ function getExtension() {
let extdata = {
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: ID,
},
@ -87,7 +87,7 @@ add_task(async function test_tabs_update() {
let extdata = {
manifest: {
version: "2.0",
applications: {
browser_specific_settings: {
gecko: {
id: ID,
},
@ -101,7 +101,7 @@ add_task(async function test_tabs_update() {
// Test that update does hide tabs when tabHide permission is removed.
extdata.manifest = {
version: "3.0",
applications: {
browser_specific_settings: {
gecko: {
id: ID,
},

Просмотреть файл

@ -67,7 +67,7 @@ async function promiseUpdatePrivatePermission(allowed, extension) {
add_task(async function test_new_tab_private() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "@private-newtab",
},

Просмотреть файл

@ -98,7 +98,7 @@ function waitForAddonEnabled(addon) {
// Default test extension data for newtab.
const extensionData = {
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "newtaburl@mochi.test",
},
@ -141,7 +141,7 @@ add_task(async function test_new_tab_ignore_settings() {
let extensionId = "newtabignore@mochi.test";
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: extensionId } },
browser_specific_settings: { gecko: { id: extensionId } },
browser_action: { default_popup: "ignore.html" },
chrome_url_overrides: { newtab: "ignore.html" },
},
@ -218,7 +218,7 @@ add_task(async function test_new_tab_keep_settings() {
let manifest = {
version: "1.0",
name: "New Tab Add-on",
applications: { gecko: { id: extensionId } },
browser_specific_settings: { gecko: { id: extensionId } },
chrome_url_overrides: { newtab: "newtab.html" },
};
let extension = ExtensionTestUtils.loadExtension({
@ -338,7 +338,7 @@ add_task(async function test_new_tab_restore_settings() {
let extensionId = "newtabrestore@mochi.test";
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: extensionId } },
browser_specific_settings: { gecko: { id: extensionId } },
chrome_url_overrides: { newtab: "restore.html" },
},
files: { "restore.html": '<h1 id="extension-new-tab">New Tab!</h1>' },
@ -419,7 +419,7 @@ add_task(async function test_new_tab_restore_settings_multiple() {
let extensionOneId = "newtabrestoreone@mochi.test";
let extensionOne = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: extensionOneId } },
browser_specific_settings: { gecko: { id: extensionOneId } },
chrome_url_overrides: { newtab: "restore-one.html" },
},
files: {
@ -432,7 +432,7 @@ add_task(async function test_new_tab_restore_settings_multiple() {
let extensionTwoId = "newtabrestoretwo@mochi.test";
let extensionTwo = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: extensionTwoId } },
browser_specific_settings: { gecko: { id: extensionTwoId } },
chrome_url_overrides: { newtab: "restore-two.html" },
},
files: { "restore-two.html": '<h1 id="extension-new-tab">New Tab!</h1>' },
@ -725,7 +725,7 @@ add_task(async function test_newtab_from_extension() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "newtaburl@mochi.test",
},

Просмотреть файл

@ -5,7 +5,7 @@
add_task(async function testWindowCreate() {
let pageExt = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: "page@mochitest" } },
browser_specific_settings: { gecko: { id: "page@mochitest" } },
protocol_handlers: [
{
protocol: "ext+foo",

Просмотреть файл

@ -155,7 +155,7 @@ add_task(async function test_windows_event_page() {
let extension = ExtensionTestUtils.loadExtension({
useAddonManager: "permanent",
manifest: {
applications: { gecko: { id: "eventpage@windows" } },
browser_specific_settings: { gecko: { id: "eventpage@windows" } },
background: { persistent: false },
},
background() {

Просмотреть файл

@ -14,7 +14,7 @@ async function testTheme(description, toolbar, content, themeManifestData) {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "dummy@mochi.test",
},

Просмотреть файл

@ -128,7 +128,7 @@ const createExtensions = (
ExtensionTestUtils.loadExtension({
manifest: {
name: "default-extension-name",
applications: {
browser_specific_settings: {
gecko: { id: `@ext-${extensionsCreated++}` },
},
...manifestData,

Просмотреть файл

@ -167,7 +167,7 @@ add_task(async function test_overriding_homepage_locale() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "homepage@example.com",
},

Просмотреть файл

@ -86,7 +86,7 @@ add_task(async function test_overrides_update_removal() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -142,7 +142,7 @@ add_task(async function test_overrides_update_removal() {
extensionInfo.manifest = {
version: "2.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -187,7 +187,7 @@ add_task(async function test_overrides_update_adding() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -220,7 +220,7 @@ add_task(async function test_overrides_update_adding() {
extensionInfo.manifest = {
version: "2.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -286,7 +286,7 @@ add_task(async function test_overrides_update_homepage_change() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -314,7 +314,7 @@ add_task(async function test_overrides_update_homepage_change() {
extensionInfo.manifest = {
version: "2.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -396,7 +396,7 @@ add_task(async function test_default_search_prompts() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},

Просмотреть файл

@ -25,7 +25,7 @@ add_task(async function testDistributionPopup() {
);
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: distExtId } },
browser_specific_settings: { gecko: { id: distExtId } },
name: "Ext Distribution",
},
});
@ -33,7 +33,7 @@ add_task(async function testDistributionPopup() {
let userExtId = "ext-user@mochi.test";
let userExtension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: userExtId } },
browser_specific_settings: { gecko: { id: userExtId } },
name: "Ext User Installed",
},
});

Просмотреть файл

@ -86,7 +86,7 @@ add_task(async function test_overrides_private() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -116,7 +116,7 @@ add_task(async function test_overrides_private() {
extensionInfo.manifest = {
version: "2.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},

Просмотреть файл

@ -31,7 +31,7 @@ function getExtension(id, background, useAddonManager) {
return ExtensionTestUtils.loadExtension({
useAddonManager,
manifest: {
applications: { gecko: { id } },
browser_specific_settings: { gecko: { id } },
permissions: ["menus"],
background: { persistent: false },
},

Просмотреть файл

@ -28,7 +28,7 @@ function createExtension(backgroundScript, permissions, isPrivileged = true) {
let extensionData = {
background: backgroundScript,
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "test@shield.mozilla.com",
},

Просмотреть файл

@ -290,7 +290,7 @@ add_task(async function test_pkcs11() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
permissions: ["pkcs11"],
applications: { gecko: { id: "pkcs11@tests.mozilla.org" } },
browser_specific_settings: { gecko: { id: "pkcs11@tests.mozilla.org" } },
},
background: background,
});

Просмотреть файл

@ -156,7 +156,7 @@ add_task(async function test_extension_overriding_app_provided_default() {
let ext1 = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "test@thirdparty.example.com",
},

Просмотреть файл

@ -135,7 +135,7 @@ add_task(async function test_upgrade_default_position_engine() {
search_url: "https://example.com/?q={searchTerms}",
},
},
applications: {
browser_specific_settings: {
gecko: {
id: "testengine@mozilla.com",
},
@ -164,7 +164,7 @@ add_task(async function test_upgrade_default_position_engine() {
search_url: "https://example.com/?q={searchTerms}",
},
},
applications: {
browser_specific_settings: {
gecko: {
id: "testengine@mozilla.com",
},

Просмотреть файл

@ -197,7 +197,7 @@ add_task(async function test_extension_setting_moz_params_fail() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: "test1@mochitest" },
},
chrome_settings_overrides: {

Просмотреть файл

@ -57,7 +57,7 @@ add_task(async function test_settings_validated() {
let xpi = await AddonTestUtils.createTempWebExtensionFile({
manifest: {
version: "1.0",
applications: { gecko: { id: "test@mochi" } },
browser_specific_settings: { gecko: { id: "test@mochi" } },
chrome_url_overrides: {
newtab: "/newtab",
},
@ -142,7 +142,7 @@ add_task(async function test_settings_validated_safemode() {
let xpi = await AddonTestUtils.createTempWebExtensionFile({
manifest: {
version: "1.0",
applications: { gecko: { id: "test@mochi" } },
browser_specific_settings: { gecko: { id: "test@mochi" } },
chrome_url_overrides: {
newtab: "/newtab",
},

Просмотреть файл

@ -144,11 +144,11 @@ add_task(async function test_multiple_extensions_overriding_newtab_page() {
let ext1 = ExtensionTestUtils.loadExtension(extObj);
extObj.manifest.chrome_url_overrides = { newtab: NEWTAB_URI_2 };
extObj.manifest.applications = { gecko: { id: EXT_2_ID } };
extObj.manifest.browser_specific_settings = { gecko: { id: EXT_2_ID } };
let ext2 = ExtensionTestUtils.loadExtension(extObj);
extObj.manifest.chrome_url_overrides = { newtab: NEWTAB_URI_3 };
extObj.manifest.applications.gecko.id = EXT_3_ID;
extObj.manifest.browser_specific_settings.gecko.id = EXT_3_ID;
extObj.incognitoOverride = "spanning";
let ext3 = ExtensionTestUtils.loadExtension(extObj);
@ -295,7 +295,7 @@ add_task(async function test_temporary_installation() {
let permanent = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: ID },
},
chrome_url_overrides: {
@ -313,7 +313,7 @@ add_task(async function test_temporary_installation() {
let temporary = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: ID },
},
chrome_url_overrides: {

Просмотреть файл

@ -55,7 +55,7 @@ add_task(async function test_url_overrides_newtab_update() {
let webExtensionFile = createTempWebExtensionFile({
manifest: {
version: "2.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -74,7 +74,7 @@ add_task(async function test_url_overrides_newtab_update() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
update_url: `http://localhost:${port}/test_update.json`,

Просмотреть файл

@ -92,7 +92,7 @@ add_task(async function test_options_ui_iframe_height() {
const extension = ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: {
browser_specific_settings: {
gecko: {id: addonID},
},
name: "Options UI Extension",
@ -223,7 +223,7 @@ add_task(async function test_options_ui_open_aboutaddons_details() {
useAddonManager: "temporary",
background,
manifest: {
applications: {
browser_specific_settings: {
gecko: {id: addonID},
},
name: "Options UI open addon details Extension",
@ -298,7 +298,7 @@ add_task(async function test_options_ui_open_in_tab() {
useAddonManager: "temporary",
background,
manifest: {
applications: {
browser_specific_settings: {
gecko: {id: addonID},
},
name: "Options UI open_in_tab Extension",
@ -422,7 +422,7 @@ add_task(async function test_options_ui_on_disable_and_enable() {
const extension = ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: {
browser_specific_settings: {
gecko: {id: addonID},
},
name: "Options UI open addon details Extension",

Просмотреть файл

@ -162,7 +162,7 @@ class MockExtension {
let { addonData } = this;
if (addonData && addonData.incognitoOverride) {
try {
let { id } = addonData.manifest.applications.gecko;
let { id } = addonData.manifest.browser_specific_settings.gecko;
if (id) {
return ExtensionTestCommon.setIncognitoOverride({ id, addonData });
}
@ -578,7 +578,7 @@ ExtensionTestCommon = class ExtensionTestCommon {
static setExtensionID(data) {
try {
if (data.manifest.applications.gecko.id) {
if (data.manifest.browser_specific_settings.gecko.id) {
return;
}
} catch (e) {
@ -586,7 +586,7 @@ ExtensionTestCommon = class ExtensionTestCommon {
}
provide(
data,
["manifest", "applications", "gecko", "id"],
["manifest", "browser_specific_settings", "gecko", "id"],
Services.uuid.generateUUID().number
);
}

Просмотреть файл

@ -46,7 +46,7 @@ ChromeUtils.defineModuleGetter(
);
let BASE_MANIFEST = Object.freeze({
applications: Object.freeze({
browser_specific_settings: Object.freeze({
gecko: Object.freeze({
id: "test@web.ext",
}),
@ -529,7 +529,7 @@ class InstallableWrapper extends AOMExtensionWrapper {
let { addonData } = this;
if (addonData && addonData.incognitoOverride) {
try {
let { id } = addonData.manifest.applications.gecko;
let { id } = addonData.manifest.browser_specific_settings.gecko;
if (id) {
return lazy.ExtensionTestCommon.setIncognitoOverride({
id,

Просмотреть файл

@ -205,7 +205,7 @@ function loadTestExtension({ version }) {
background: {
service_worker: "sw.js",
},
applications: { gecko: { id: "test-bg-sw@mochi.test" } },
browser_specific_settings: { gecko: { id: "test-bg-sw@mochi.test" } },
},
files: {
"page.html": "<!DOCTYPE html><body></body>",

Просмотреть файл

@ -118,7 +118,7 @@ add_task(async function test_management_themes() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: TEST_ID,
},

Просмотреть файл

@ -24,7 +24,9 @@ add_task(async function test_MockExtension() {
// xpcshell/test_ext_test_mock.js tests "temporary", so here we use
// "permanent" to have even more test coverage.
useAddonManager: "permanent",
manifest: { applications: { gecko: { id: "@permanent-mock-extension" } } },
manifest: {
browser_specific_settings: { gecko: { id: "@permanent-mock-extension" } },
},
});
Assert.ok(!ext.id, "Extension ID is initially unavailable");

Просмотреть файл

@ -89,7 +89,7 @@ add_task(async function test_on_updated_eventpage() {
const extension = ExtensionTestUtils.loadExtension({
useAddonManager: "permanent",
manifest: {
applications: { gecko: { id: "watcher@mochitest" } },
browser_specific_settings: { gecko: { id: "watcher@mochitest" } },
background: { persistent: false },
},
background() {

Просмотреть файл

@ -78,7 +78,7 @@ async function test_moz_extension_svg_context_fill({
let extDefinition = {
manifest: {
applications: { gecko: { id: addonId } },
browser_specific_settings: { gecko: { id: addonId } },
},
background() {
browser.test.sendMessage("svg-url", browser.runtime.getURL("context-fill-fallback-red.svg"));

Просмотреть файл

@ -20,7 +20,7 @@ add_task(async function test_api() {
let unlogged = ExtensionTestUtils.loadExtension({
isPrivileged: true,
manifest: {
applications: { gecko: { id: "unlogged@tests.mozilla.org" } },
browser_specific_settings: { gecko: { id: "unlogged@tests.mozilla.org" } },
permissions: ["webRequest", "webRequestBlocking", "<all_urls>"],
},
background() {
@ -39,7 +39,7 @@ add_task(async function test_api() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: "watched@tests.mozilla.org" } },
browser_specific_settings: { gecko: { id: "watched@tests.mozilla.org" } },
permissions: [
"tabs",
"tabHide",
@ -357,7 +357,7 @@ add_task(async function test_api() {
let logger = ExtensionTestUtils.loadExtension({
isPrivileged: true,
manifest: {
applications: { gecko: { id: "watcher@tests.mozilla.org" } },
browser_specific_settings: { gecko: { id: "watcher@tests.mozilla.org" } },
permissions: ["activityLog"],
},
background: `(${backgroundScript})("${URL}", "${extensionUrl}")`,

Просмотреть файл

@ -162,7 +162,7 @@ add_task(async function testLocalStorage() {
useAddonManager: "permanent",
manifest: {
name: "Open tabs",
applications: { gecko: { id: "open-tabs@tests.mozilla.org" }, },
browser_specific_settings: { gecko: { id: "open-tabs@tests.mozilla.org" }, },
permissions: ["cookies"],
},
async background() {
@ -220,7 +220,7 @@ add_task(async function testLocalStorage() {
background,
manifest: {
name: "Test Extension",
applications: { gecko: { id: "localStorage@tests.mozilla.org" } },
browser_specific_settings: { gecko: { id: "localStorage@tests.mozilla.org" } },
permissions: ["browsingData", "tabs"],
content_scripts: [
{
@ -262,7 +262,7 @@ add_task(async function test_browserData_on_aboutnewtab_and_file_data() {
browser.test.sendMessage("done");
},
manifest: {
applications: { gecko: { id: "indexed-db-file@test.mozilla.org" } },
browser_specific_settings: { gecko: { id: "indexed-db-file@test.mozilla.org" } },
permissions: ["browsingData"],
},
});
@ -308,7 +308,7 @@ add_task(async function test_browserData_should_not_remove_extension_data() {
browser.test.sendMessage("done", window.localStorage.getItem("key"));
},
manifest: {
applications: { gecko: { id: "extension-data@tests.mozilla.org" } },
browser_specific_settings: { gecko: { id: "extension-data@tests.mozilla.org" } },
permissions: ["browsingData"],
},
});

Просмотреть файл

@ -68,7 +68,7 @@ function makeExtension(id, otherId) {
let extensionData = {
background: `(${backgroundScript})(${args})`,
manifest: {
"applications": {"gecko": {id}},
browser_specific_settings: {gecko: {id}},
},
};

Просмотреть файл

@ -44,7 +44,7 @@ add_task(async function test_noPermission() {
add_task(async function test_getRedirectURL() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "identity@mozilla.org",
},
@ -261,7 +261,7 @@ function background_launchWebAuthFlow({
add_task(async function test_autoRedirect() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "identity@mozilla.org",
},
@ -279,7 +279,7 @@ add_task(async function test_autoRedirect() {
add_task(async function test_autoRedirect_noRedirectURI() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "identity@mozilla.org",
},
@ -298,7 +298,7 @@ add_task(async function test_autoRedirect_noRedirectURI() {
add_task(async function test_noRedirect() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "identity@mozilla.org",
},
@ -320,7 +320,7 @@ add_task(async function test_noRedirect() {
add_task(async function test_interaction() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "identity@mozilla.org",
},
@ -339,7 +339,7 @@ add_task(async function test_interaction() {
add_task(async function test_auto303Redirect() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "identity@mozilla.org",
},
@ -357,7 +357,7 @@ add_task(async function test_auto303Redirect() {
add_task(async function test_loopbackRedirectURI() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "identity@mozilla.org",
},

Просмотреть файл

@ -129,7 +129,7 @@ async function test_uninstall({extensionId, writeData, readData, assertResults})
let extension = ExtensionTestUtils.loadExtension({
background: writeData,
manifest: {
applications: {gecko: {id: extensionId}},
browser_specific_settings: {gecko: {id: extensionId}},
permissions: ["storage"],
},
useAddonManager: "temporary",
@ -149,7 +149,7 @@ async function test_uninstall({extensionId, writeData, readData, assertResults})
extension = ExtensionTestUtils.loadExtension({
background: readData,
manifest: {
applications: {gecko: {id: extensionId}},
browser_specific_settings: {gecko: {id: extensionId}},
permissions: ["storage"],
},
useAddonManager: "temporary",
@ -166,7 +166,7 @@ async function test_uninstall({extensionId, writeData, readData, assertResults})
extension = ExtensionTestUtils.loadExtension({
background: readData,
manifest: {
applications: {gecko: {id: extensionId}},
browser_specific_settings: {gecko: {id: extensionId}},
permissions: ["storage"],
},
useAddonManager: "temporary",

Просмотреть файл

@ -15,7 +15,7 @@
async function test_query(query) {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "current-window@tests.mozilla.org",
}

Просмотреть файл

@ -30,7 +30,7 @@ async function test_background_storagePersist(EXTENSION_ID) {
manifest: {
permissions: ["storage", "unlimitedStorage"],
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},

Просмотреть файл

@ -357,7 +357,7 @@ add_task(async function test_web_accessible_resources_v3_by_id() {
await _test_web_accessible_resources({
manifest: {
manifest_version: 3,
applications: {
browser_specific_settings: {
gecko: {
id: "extension_wac@mochitest",
},
@ -508,7 +508,7 @@ add_task(async function test_web_accessible_resources_extensions_MV2() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: "this-mv2@mochitest" } },
browser_specific_settings: { gecko: { id: "this-mv2@mochitest" } },
},
background,
files: {

Просмотреть файл

@ -136,7 +136,7 @@ function test_sync_reloading_extensions_works() {
return ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: extensionId } },
browser_specific_settings: { gecko: { id: extensionId } },
permissions: ["storage"],
},
background: `(${background})()`,
@ -750,7 +750,7 @@ async function test_background_storage_area_no_bytes_in_use(area) {
const extensionDef = {
manifest: {
permissions: ["storage"],
applications: { gecko: { id: EXT_ID } },
browser_specific_settings: { gecko: { id: EXT_ID } },
},
background: `(${check_storage_area_no_bytes_in_use})("${area}")`,
};
@ -875,7 +875,7 @@ async function test_background_storage_area_with_bytes_in_use(
const extensionDef = {
manifest: {
permissions: ["storage"],
applications: { gecko: { id: EXT_ID } },
browser_specific_settings: { gecko: { id: EXT_ID } },
},
background: `(${check_storage_area_with_bytes_in_use})("${area}", ${expectQuota})`,
};

Просмотреть файл

@ -18,7 +18,7 @@ add_setup(async () => {
add_task(async function test_api_restricted() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: "activityLog-permission@tests.mozilla.org" },
},
permissions: ["activityLog"],
@ -47,7 +47,7 @@ add_task(
temporarilyInstalled: true,
isPrivileged: false,
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: "activityLog-permission@tests.mozilla.org" },
},
permissions: ["activityLog"],

Просмотреть файл

@ -81,7 +81,7 @@ add_task(
async function test_propagated_isHandlingUserInput_on_async_api_methods_calls() {
const extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: "@test-ext" } },
browser_specific_settings: { gecko: { id: "@test-ext" } },
},
background() {
browser.test.onMessage.addListener(async (msg, args) => {

Просмотреть файл

@ -50,7 +50,7 @@ add_task(
background: {
service_worker: "sw.js",
},
applications: { gecko: { id: "test-bg-sw@mochi.test" } },
browser_specific_settings: { gecko: { id: "test-bg-sw@mochi.test" } },
},
files: {
"page.html": "<!DOCTYPE html><body></body>",
@ -180,7 +180,7 @@ add_task(async function test_serviceworker_lifecycle_events() {
background: {
service_worker: "sw.js",
},
applications: { gecko: { id: "test-bg-sw@mochi.test" } },
browser_specific_settings: { gecko: { id: "test-bg-sw@mochi.test" } },
},
files: {
"page.html": "<!DOCTYPE html><body></body>",

Просмотреть файл

@ -460,7 +460,7 @@ add_task(async function delay_updates_settings_after_restart() {
manifest_version: 2,
name: "Delay Upgrade",
version: "2.0",
applications: {
browser_specific_settings: {
gecko: { id: SETTINGS_ID },
},
permissions: ["browserSettings"],
@ -477,7 +477,7 @@ add_task(async function delay_updates_settings_after_restart() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: SETTINGS_ID,
update_url: `http://example.com/test_update.json`,

Просмотреть файл

@ -58,7 +58,9 @@ add_task(async function test_contentscript_runAt() {
let extensionData = {
manifest: {
applications: { gecko: { id: "contentscript@tests.mozilla.org" } },
browser_specific_settings: {
gecko: { id: "contentscript@tests.mozilla.org" },
},
content_scripts: [
{
matches: ["http://*/*/file_sample.html"],
@ -162,7 +164,9 @@ add_task(async function test_contentscript_window_open() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: "contentscript@tests.mozilla.org" } },
browser_specific_settings: {
gecko: { id: "contentscript@tests.mozilla.org" },
},
content_scripts: [
{
matches: ["<all_urls>"],

Просмотреть файл

@ -20,12 +20,12 @@ add_task(async function test_contentscript_create_iframe() {
);
let {
applications: {
browser_specific_settings: {
gecko: { id: expectedManifestGeckoId },
},
} = chrome.runtime.getManifest();
let {
applications: {
browser_specific_settings: {
gecko: { id: actualManifestGeckoId },
},
} = manifest;
@ -37,7 +37,7 @@ add_task(async function test_contentscript_create_iframe() {
);
let {
applications: {
browser_specific_settings: {
gecko: { id: testGetManifestGeckoId },
},
} = testGetManifest;
@ -79,7 +79,7 @@ add_task(async function test_contentscript_create_iframe() {
const ID = "contentscript@tests.mozilla.org";
let extensionData = {
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
content_scripts: [
{
matches: ["http://example.com/data/file_sample.html"],

Просмотреть файл

@ -24,7 +24,7 @@ function makeExtension(id, content_scripts) {
manifest: {
manifest_version: 3,
applications: { gecko: { id } },
browser_specific_settings: { gecko: { id } },
content_scripts,
permissions: ["scripting"],

Просмотреть файл

@ -39,7 +39,7 @@ add_task(async function test_contextualIdentities_without_permissions() {
useAddonManager: "temporary",
background,
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: "testing@thing.com" },
},
permissions: [],
@ -146,7 +146,7 @@ add_task(async function test_contextualIdentity_events() {
background,
useAddonManager: "temporary",
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: "testing@thing.com" },
},
permissions: ["contextualIdentities"],
@ -345,7 +345,7 @@ add_task(async function test_contextualIdentity_with_permissions() {
useAddonManager: "temporary",
background,
manifest: {
applications: {
browser_specific_settings: {
gecko: { id },
},
permissions: ["contextualIdentities"],
@ -392,7 +392,7 @@ add_task(async function test_contextualIdentity_extensions_enable_containers() {
useAddonManager: "temporary",
background,
manifest: {
applications: {
browser_specific_settings: {
gecko: { id },
},
permissions: ["contextualIdentities"],
@ -490,7 +490,7 @@ add_task(async function test_contextualIdentity_preference_change() {
background,
manifest: {
version,
applications: {
browser_specific_settings: {
gecko: { id },
},
permissions: ["contextualIdentities"],
@ -528,7 +528,7 @@ add_task(
let extension = ExtensionTestUtils.loadExtension({
useAddonManager: "permanent",
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: "eventpage@mochitest" },
},
permissions: ["contextualIdentities"],

Просмотреть файл

@ -119,7 +119,7 @@ add_task(async function testExtensionDebuggingUtilsCleanup() {
add_task(async function testExtensionDebuggingUtilsAddonReloaded() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "test-reloaded@test.mozilla.com",
},
@ -164,7 +164,7 @@ add_task(async function testExtensionDebuggingUtilsAddonReloaded() {
// conditions similar to an addon reloaded while the Addon Debugger is opened.
extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "test-reloaded@test.mozilla.com",
},
@ -216,7 +216,7 @@ add_task(async function testExtensionDebuggingUtilsAddonReloaded() {
add_task(async function testExtensionDebuggingUtilsWithMultipleAddons() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "test-addon-1@test.mozilla.com",
},
@ -228,7 +228,7 @@ add_task(async function testExtensionDebuggingUtilsWithMultipleAddons() {
});
let anotherExtension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "test-addon-2@test.mozilla.com",
},

Просмотреть файл

@ -54,7 +54,7 @@ add_task(
// A simple download driving extension
let dl_extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: "downloader@mochitest" } },
browser_specific_settings: { gecko: { id: "downloader@mochitest" } },
permissions: ["downloads"],
background: { persistent: false },
},

Просмотреть файл

@ -118,7 +118,7 @@ add_task(async function test_private_download() {
browser.test.notifyPass("private download test done");
},
manifest: {
applications: { gecko: { id: "@spanning" } },
browser_specific_settings: { gecko: { id: "@spanning" } },
permissions: ["downloads"],
},
incognitoOverride: "spanning",
@ -126,7 +126,7 @@ add_task(async function test_private_download() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: "@not_allowed" } },
browser_specific_settings: { gecko: { id: "@not_allowed" } },
permissions: ["downloads", "downloads.open"],
},
background: async function() {
@ -275,7 +275,7 @@ add_task(async function download_blob_in_perma_private_browsing() {
}
let pb_extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: "@private-download-ext" } },
browser_specific_settings: { gecko: { id: "@private-download-ext" } },
permissions: ["downloads"],
},
background: testScript,

Просмотреть файл

@ -284,7 +284,9 @@ add_task(async function test_unbundled_experiments() {
isPrivileged: true,
manifest: {
applications: { gecko: { id: "crunk@experiments.addons.mozilla.org" } },
browser_specific_settings: {
gecko: { id: "crunk@experiments.addons.mozilla.org" },
},
experiment_apis: {
crunk: {

Просмотреть файл

@ -542,7 +542,7 @@ add_task(async function test_preference_manager_set_when_disabled() {
let extension = ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id } },
browser_specific_settings: { gecko: { id } },
},
});
@ -654,7 +654,7 @@ add_task(async function test_preference_default_upgraded() {
let extension = ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id } },
browser_specific_settings: { gecko: { id } },
},
});
@ -699,7 +699,7 @@ add_task(async function test_preference_select() {
let extensionData = {
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: "@one" } },
browser_specific_settings: { gecko: { id: "@one" } },
},
};
let one = ExtensionTestUtils.loadExtension(extensionData);
@ -791,7 +791,7 @@ add_task(async function test_preference_select() {
let two = ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: "@two" } },
browser_specific_settings: { gecko: { id: "@two" } },
},
});
@ -818,7 +818,7 @@ add_task(async function test_preference_select() {
let three = ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: "@three" } },
browser_specific_settings: { gecko: { id: "@three" } },
},
});

Просмотреть файл

@ -51,19 +51,19 @@ add_task(async function test_settings_store() {
ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: "@first" } },
browser_specific_settings: { gecko: { id: "@first" } },
},
}),
ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: "@second" } },
browser_specific_settings: { gecko: { id: "@second" } },
},
}),
ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: "@third" } },
browser_specific_settings: { gecko: { id: "@third" } },
},
}),
];
@ -723,13 +723,13 @@ add_task(async function test_settings_store_setByUser() {
ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: "@first" } },
browser_specific_settings: { gecko: { id: "@first" } },
},
}),
ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: "@second" } },
browser_specific_settings: { gecko: { id: "@second" } },
},
}),
];
@ -797,7 +797,7 @@ add_task(async function test_settings_store_setByUser() {
let three = ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: "@third" } },
browser_specific_settings: { gecko: { id: "@third" } },
},
});
await three.startup();
@ -920,7 +920,7 @@ add_task(async function test_settings_store_add_disabled() {
let extension = ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id } },
browser_specific_settings: { gecko: { id } },
},
});
@ -967,7 +967,7 @@ add_task(async function test_settings_uninstall_remove() {
let extension = ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id } },
browser_specific_settings: { gecko: { id } },
},
});
@ -1017,13 +1017,13 @@ add_task(async function test_get_all_settings() {
ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: "@first" } },
browser_specific_settings: { gecko: { id: "@first" } },
},
}),
ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: "@second" } },
browser_specific_settings: { gecko: { id: "@second" } },
},
}),
];

Просмотреть файл

@ -10,7 +10,7 @@ add_task(async function extension_startup_early_error() {
const EXTENSION_ID = "@extension-with-package-error";
let extension = ExtensionTestCommon.generate({
manifest: {
applications: { gecko: { id: EXTENSION_ID } },
browser_specific_settings: { gecko: { id: EXTENSION_ID } },
},
});

Просмотреть файл

@ -112,7 +112,7 @@ let getExtension = () => {
manifest: {
permissions: ["geckoProfiler"],
applications: {
browser_specific_settings: {
gecko: {
id: "profilertest@mozilla.com",
},

Просмотреть файл

@ -27,7 +27,7 @@ add_task(async function() {
},
manifest: {
permissions: ["geckoProfiler"],
applications: {
browser_specific_settings: {
gecko: {
id: "profilertest@mozilla.com",
},

Просмотреть файл

@ -67,7 +67,7 @@ let extensionData = {
},
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "i18n_css@mochi.test",
},

Просмотреть файл

@ -65,7 +65,7 @@ add_task(async function test_extension_privileged_not_allowed() {
let extensionData = {
manifest: {
version: "1.0",
applications: { gecko: { id: addonId } },
browser_specific_settings: { gecko: { id: addonId } },
incognito: "not_allowed",
},
useAddonManager: "permanent",
@ -94,7 +94,7 @@ add_task(async function test_extension_upgrade_not_allowed() {
let extensionData = {
manifest: {
version: "1.0",
applications: { gecko: { id: addonId } },
browser_specific_settings: { gecko: { id: addonId } },
incognito: "spanning",
},
useAddonManager: "permanent",

Просмотреть файл

@ -10,7 +10,7 @@ add_task(async function test_json_parser() {
"manifest.json": String.raw`{
// This is a manifest.
"manifest_version": 2,
"applications": {"gecko": {"id": "${ID}"}},
"browser_specific_settings": {"gecko": {"id": "${ID}"}},
"name": "This \" is // not a comment",
"version": "0.1\\" // , "description": "This is not a description"
}`,
@ -19,7 +19,7 @@ add_task(async function test_json_parser() {
let expectedManifest = {
manifest_version: 2,
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
name: 'This " is // not a comment',
version: "0.1\\",
};

Просмотреть файл

@ -28,7 +28,7 @@ function backgroundScript() {
const ID = "test-webextension@mozilla.com";
let extensionData = {
manifest: { applications: { gecko: { id: ID } } },
manifest: { browser_specific_settings: { gecko: { id: ID } } },
background: backgroundScript,
};

Просмотреть файл

@ -99,7 +99,7 @@ add_task(async function test_management_permission() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "management@test",
},
@ -121,7 +121,7 @@ add_task(async function test_management_permission() {
// The listener will make the test fail if fired.
let ext2 = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: "on-installed@test",
},
@ -142,7 +142,7 @@ add_task(async function test_management_getAll() {
function getManifest(id) {
return {
applications: {
browser_specific_settings: {
gecko: {
id,
},
@ -253,7 +253,7 @@ add_task(
let testExt = ExtensionTestUtils.loadExtension({
useAddonManager: "permanent",
manifest: {
applications: { gecko: { id: "test-ext@mochitest" } },
browser_specific_settings: { gecko: { id: "test-ext@mochitest" } },
},
background() {},
});

Просмотреть файл

@ -12,7 +12,7 @@ const { MockRegistrar } = ChromeUtils.import(
const id = "uninstall_self_test@tests.mozilla.com";
const manifest = {
applications: {
browser_specific_settings: {
gecko: {
id,
},

Просмотреть файл

@ -215,7 +215,7 @@ add_task(async function test_happy_path() {
let extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
optional_permissions: ["nativeMessaging"],
},
useAddonManager: "temporary",
@ -289,7 +289,7 @@ async function simpleTest(app) {
let extension = ExtensionTestUtils.loadExtension({
background: `(${background})(${JSON.stringify(app)});`,
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
permissions: ["nativeMessaging"],
},
});
@ -322,7 +322,7 @@ async function testBrokenApp({
});
},
manifest: {
applications: { gecko: { id: extensionId } },
browser_specific_settings: { gecko: { id: extensionId } },
permissions: ["nativeMessaging"],
},
});
@ -440,7 +440,7 @@ add_task(async function test_sendNativeMessage() {
let extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
permissions: ["nativeMessaging"],
},
});
@ -500,7 +500,7 @@ add_task(async function test_disconnect() {
let extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
permissions: ["nativeMessaging"],
},
});
@ -553,7 +553,7 @@ add_task(async function test_write_limit() {
let extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
permissions: ["nativeMessaging"],
},
});
@ -605,7 +605,7 @@ add_task(async function test_read_limit() {
let extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
permissions: ["nativeMessaging"],
},
});
@ -689,7 +689,7 @@ add_task(async function test_child_process() {
let extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
permissions: ["nativeMessaging"],
},
});
@ -741,7 +741,7 @@ add_task(async function test_stderr() {
let extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
permissions: ["nativeMessaging"],
},
});
@ -791,7 +791,7 @@ add_task(async function test_multiple_connects() {
let extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
permissions: ["nativeMessaging"],
},
});
@ -832,7 +832,7 @@ add_task(async function test_connect_native_from_content_script() {
matches: ["http://example.com/dummy"],
},
],
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
permissions: ["nativeMessaging"],
},
files: {
@ -861,7 +861,7 @@ async function startupExtensionAndRequestPermission() {
const extension = ExtensionTestUtils.loadExtension({
useAddonManager: "temporary",
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
optional_permissions: ["nativeMessaging"],
background: { persistent: false },
},

Просмотреть файл

@ -104,7 +104,7 @@ add_task(async function test_round_trip_perf() {
});
},
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
permissions: ["nativeMessaging"],
},
});

Просмотреть файл

@ -65,7 +65,7 @@ add_task(async function test_unresponsive_native_app() {
let extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: { gecko: { id: ID } },
browser_specific_settings: { gecko: { id: ID } },
permissions: ["nativeMessaging"],
},
});

Просмотреть файл

@ -103,7 +103,9 @@ add_task(async function test_networkStatus() {
mockNetworkStatusService.register();
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: "networkstatus@tests.mozilla.org" } },
browser_specific_settings: {
gecko: { id: "networkstatus@tests.mozilla.org" },
},
permissions: ["networkStatus"],
},
isPrivileged: true,
@ -176,7 +178,7 @@ add_task(
temporarilyInstalled: true,
isPrivileged: false,
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: "networkstatus-permission@tests.mozilla.org" },
},
permissions: ["networkStatus"],

Просмотреть файл

@ -761,7 +761,7 @@ add_task(
useAddonManager: "permanent",
manifest: {
permissions: ["mozillaAddons", "resource://x/", "about:reader*"],
applications: { gecko: { id } },
browser_specific_settings: { gecko: { id } },
},
background() {},
});
@ -785,7 +785,9 @@ add_task(
let generatedExt = ExtensionTestCommon.generate({
manifest: {
permissions: ["mozillaAddons", "resource://x/", "about:reader*"],
applications: { gecko: { id: "extension-data@mochi.test" } },
browser_specific_settings: {
gecko: { id: "extension-data@mochi.test" },
},
},
});

Просмотреть файл

@ -46,7 +46,7 @@ add_task(async function test_permissions_on_startup() {
let extensionId = "@permissionTest";
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: {
browser_specific_settings: {
gecko: { id: extensionId },
},
permissions: ["tabs"],
@ -857,7 +857,7 @@ async function test_permissions_prompt(manifest_version) {
manifest_version,
version: "2.0",
applications: { gecko: { id: extension.id } },
browser_specific_settings: { gecko: { id: extension.id } },
permissions: PERMS,
host_permissions: ORIGINS,

Просмотреть файл

@ -217,7 +217,7 @@ add_task(async function test_geo_permissions() {
let extension = ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: { gecko: { id: "geo-test@test" } },
browser_specific_settings: { gecko: { id: "geo-test@test" } },
optional_permissions: ["geolocation"],
},
useAddonManager: "permanent",
@ -263,7 +263,7 @@ add_task(async function test_geo_permissions() {
// We should not have geo permission after this upgrade.
await extension.upgrade({
manifest: {
applications: { gecko: { id: "geo-test@test" } },
browser_specific_settings: { gecko: { id: "geo-test@test" } },
},
useAddonManager: "permanent",
});

Просмотреть файл

@ -34,7 +34,7 @@ add_task(async function test_migrated_permission_to_optional() {
let extensionData = {
manifest: {
version: "1.0",
applications: { gecko: { id } },
browser_specific_settings: { gecko: { id } },
permissions: [
"webRequest",
"tabs",
@ -106,7 +106,7 @@ add_task(async function test_required_permissions_removed() {
browser.privacy.services.passwordSavingEnabled.set({ value: false });
},
manifest: {
applications: { gecko: { id: "pref-test@test" } },
browser_specific_settings: { gecko: { id: "pref-test@test" } },
permissions: ["tabs", "browserSettings", "privacy", "http://test.com/*"],
},
useAddonManager: "permanent",
@ -156,7 +156,7 @@ add_task(async function test_granted_permissions_removed() {
// "tabs" is never granted, it is included to exercise the removal code
// that called during the upgrade.
manifest: {
applications: { gecko: { id: "pref-test@test" } },
browser_specific_settings: { gecko: { id: "pref-test@test" } },
optional_permissions: [
"tabs",
"browserSettings",
@ -195,7 +195,7 @@ add_task(async function test_addon_to_theme_update() {
let id = "theme-test@test";
let extData = {
manifest: {
applications: { gecko: { id } },
browser_specific_settings: { gecko: { id } },
version: "1.0",
optional_permissions: ["tabs"],
},
@ -220,7 +220,7 @@ add_task(async function test_addon_to_theme_update() {
await extension.upgrade({
manifest: {
applications: { gecko: { id } },
browser_specific_settings: { gecko: { id } },
version: "2.0",
theme: {
images: {

Просмотреть файл

@ -679,7 +679,7 @@ add_task(
let extension = ExtensionTestUtils.loadExtension({
useAddonManager: "permanent",
manifest: {
applications: { gecko: { id: "eventpage@test" } },
browser_specific_settings: { gecko: { id: "eventpage@test" } },
background: { persistent: false },
},
background() {
@ -1116,7 +1116,7 @@ add_task(
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: { id },
},
background: { persistent: false },
@ -1182,7 +1182,7 @@ add_task(
useAddonManager: "permanent",
manifest: {
version: "2.0",
applications: {
browser_specific_settings: {
gecko: { id, update_url: `http://example.com/test_update.json` },
},
background: { persistent: false },

Просмотреть файл

@ -110,7 +110,7 @@ add_task(async function test_disable() {
ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: OLD_ID,
},
@ -123,7 +123,7 @@ add_task(async function test_disable() {
ExtensionTestUtils.loadExtension({
background,
manifest: {
applications: {
browser_specific_settings: {
gecko: {
id: NEW_ID,
},

Просмотреть файл

@ -92,7 +92,7 @@ add_task(async function test_privacy_update() {
let webExtensionFile = createTempWebExtensionFile({
manifest: {
version: "2.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -110,7 +110,7 @@ add_task(async function test_privacy_update() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
update_url: `http://localhost:${port}/test_update.json`,

Просмотреть файл

@ -74,7 +74,7 @@ add_task(async function test_proxy_settings() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
applications: { gecko: { id: "proxy.settings@mochi.test" } },
browser_specific_settings: { gecko: { id: "proxy.settings@mochi.test" } },
permissions: ["proxy", "webRequest", "<all_urls>"],
},
incognitoOverride: "spanning",

Просмотреть файл

@ -143,7 +143,7 @@ add_task(
background: {
service_worker: "sw.js",
},
applications: { gecko: { id: "test-bg-sw@mochi.test" } },
browser_specific_settings: { gecko: { id: "test-bg-sw@mochi.test" } },
},
files: {

Просмотреть файл

@ -134,7 +134,7 @@ add_task(async function test_should_fire_on_addon_update() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
update_url: `http://localhost:${port}/test_update.json`,
@ -162,7 +162,7 @@ add_task(async function test_should_fire_on_addon_update() {
let webExtensionFile = createTempWebExtensionFile({
manifest: {
version: "2.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -228,7 +228,7 @@ add_task(async function test_should_fire_on_browser_update() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -300,7 +300,7 @@ add_task(async function test_should_not_fire_on_reload() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -340,7 +340,7 @@ add_task(async function test_should_not_fire_on_restart() {
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -382,7 +382,7 @@ add_task(async function test_temporary_installation() {
useAddonManager: "temporary",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},
@ -417,7 +417,7 @@ add_task(
useAddonManager: "permanent",
manifest: {
version: "1.0",
applications: {
browser_specific_settings: {
gecko: {
id: EXTENSION_ID,
},

Просмотреть файл

@ -16,7 +16,7 @@ add_task(async function() {
frame.src = "page.html";
document.body.appendChild(frame);
},
manifest: { applications: { gecko: { id: ID1 } } },
manifest: { browser_specific_settings: { gecko: { id: ID1 } } },
files: {
"page.js": function() {
browser.runtime.onMessage.addListener((msg, sender) => {
@ -35,7 +35,7 @@ add_task(async function() {
browser.test.sendMessage("received-external", { msg, sender });
});
},
manifest: { applications: { gecko: { id: ID2 } } },
manifest: { browser_specific_settings: { gecko: { id: ID2 } } },
});
await Promise.all([extension1.startup(), extension2.startup()]);

Просмотреть файл

@ -31,7 +31,7 @@ function makeExtension(opts) {
manifest: {
version: opts.version,
applications: { gecko: { id: ADDON_ID } },
browser_specific_settings: { gecko: { id: ADDON_ID } },
name: "__MSG_name__",
@ -73,7 +73,7 @@ add_task(async function test_langpack_startup_cache() {
name: "test Language Pack",
version: "1.0",
manifest_version: 2,
applications: {
browser_specific_settings: {
gecko: {
id: "@test-langpack",
strict_min_version: "42.0",

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше