Bug 1394553 - Part 2: Prune the GRANTED_WITHOUT_USER_PROMPT list draft
authorTomislav Jovanovic <tomica@gmail.com>
Mon, 04 Sep 2017 21:51:25 +0200
changeset 662639 a43a4d3f1ed58ca31697aec35a1a5ca9aab9539d
parent 662638 8c92411044afbf055f7597dfd5c82b89dd35db27
child 730928 41b5222f27d11339a6e8588a5a7531f829fabdeb
push id79146
push userbmo:tomica@gmail.com
push dateMon, 11 Sep 2017 21:50:09 +0000
bugs1394553
milestone57.0a1
Bug 1394553 - Part 2: Prune the GRANTED_WITHOUT_USER_PROMPT list MozReview-Commit-ID: 844ITHXaauA
toolkit/components/extensions/schemas/downloads.json
toolkit/components/extensions/test/xpcshell/test_ext_permissions.js
--- 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`);
       }
     }
   }
 });