Bug 1542351: Allow 'edge' and non-gecko browser specific settings in the extensions schema manifest r=rpl

Differential Revision: https://phabricator.services.mozilla.com/D32819

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Joseph Jalbert 2019-06-09 15:38:20 +00:00
parent d6cc5ee003
commit 36994eb6d0
2 changed files with 39 additions and 1 deletions

View File

@ -32,8 +32,14 @@
"gecko": {
"$ref": "FirefoxSpecificProperties",
"optional": true
},
"edge": {
"type": "object",
"additionalProperties": { "type": "any" },
"optional": true
}
}
},
"additionalProperties": { "$ref": "UnrecognizedProperty" }
},
"name": {

View File

@ -571,3 +571,35 @@ add_task(async function test_permissions_prompt_cancel() {
await OS.File.remove(xpi.path);
});
// Test that presence of 'edge' property in 'browser_specific_settings' doesn't prevent installation from completing successfully
add_task(async function test_non_gecko_bss_install() {
const ID = "ms_edge@tests.mozilla.org";
const manifest = {
name: "MS Edge and unknown browser test",
description: "extension with bss properties for 'edge', and 'unknown_browser'",
manifest_version: 2,
version: "1.0",
applications: {gecko: {id: ID}},
browser_specific_settings: {
edge: {
browser_action_next_to_addressbar: true,
},
unknown_browser: {
unknown_setting: true,
},
},
};
const extension = ExtensionTestUtils.loadExtension({
manifest,
useAddonManager: "temporary",
});
await extension.startup();
const addon = await promiseAddonByID(ID);
notEqual(addon, null, "Add-on is installed");
await extension.unload();
});