Bug 1394553 - Part 2: Prune the GRANTED_WITHOUT_USER_PROMPT list
MozReview-Commit-ID: 844ITHXaauA
--- a/toolkit/components/extensions/schemas/downloads.json
+++ b/toolkit/components/extensions/schemas/downloads.json
@@ -3,18 +3,17 @@
"namespace": "manifest",
"types": [
{
"$extend": "Permission",
"choices": [{
"type": "string",
"enum": [
"downloads",
- "downloads.open",
- "downloads.shelf"
+ "downloads.open"
]
}]
}
]
},
{
"namespace": "downloads",
"permissions": ["downloads"],
--- a/toolkit/components/extensions/test/xpcshell/test_ext_permissions.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_permissions.js
@@ -367,27 +367,23 @@ add_task(async function test_alreadyGran
await extension.unload();
});
// IMPORTANT: Do not change this list without review from a Web Extensions peer!
const GRANTED_WITHOUT_USER_PROMPT = [
"activeTab",
"alarms",
- "browsingData",
"contextMenus",
"contextualIdentities",
"cookies",
- "downloads.open",
- "downloads.shelf",
"geckoProfiler",
"identity",
"idle",
"menus",
- "proxy",
"storage",
"theme",
"webRequest",
"webRequestBlocking",
];
add_task(function test_permissions_have_localization_strings() {
const ns = Schemas.getNamespace("manifest");
@@ -396,16 +392,17 @@ add_task(function test_permissions_have_
const optional = ns.get("OptionalPermission").choices;
const bundle = Services.strings.createBundle(BROWSER_PROPERTIES);
for (const choice of permissions.concat(optional)) {
for (const perm of choice.enumeration || []) {
try {
const str = bundle.GetStringFromName(`webextPerms.description.${perm}`);
+
ok(str.length, `Found localization string for '${perm}' permission`);
} catch (e) {
ok(GRANTED_WITHOUT_USER_PROMPT.includes(perm),
`Permission '${perm}' intentionally granted without prompting the user`);
}
}
}
});