Bug 1270306 - [webext] extension.isAllowedFileSchemeAccess should return null. r=kmag, a=sylvestre
authorChristopher Grebs <cgrebs@mozilla.com>
Tue, 24 May 2016 21:03:46 +0200
changeset 379405 4fc43b4a5d206d2f9178dfdf6dc0bf02390cd338
parent 379404 66c39e2030d819d3e2e59dc0288593a8b9f465b8
child 379406 b168c418ec09549699fa5085b8b054ca40f96a98
push id21011
push usermak77@bonardo.net
push dateThu, 16 Jun 2016 13:40:45 +0000
reviewerskmag, sylvestre
bugs1270306
milestone48.0a2
Bug 1270306 - [webext] extension.isAllowedFileSchemeAccess should return null. r=kmag, a=sylvestre
toolkit/components/extensions/ext-extension.js
toolkit/components/extensions/test/mochitest/test_ext_extension.html
--- a/toolkit/components/extensions/ext-extension.js
+++ b/toolkit/components/extensions/ext-extension.js
@@ -35,14 +35,14 @@ extensions.registerSchemaAPI("extension"
         return context.incognito;
       },
 
       isAllowedIncognitoAccess() {
         return Promise.resolve(true);
       },
 
       isAllowedFileSchemeAccess() {
-        return Promise.resolve(true);
+        return Promise.resolve(false);
       },
     },
   };
 });
 
--- a/toolkit/components/extensions/test/mochitest/test_ext_extension.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_extension.html
@@ -31,17 +31,17 @@ add_task(function* test_is_allowed_incog
   yield extension.awaitFinish("isAllowedIncognitoAccess");
   yield extension.unload();
   info("extension unloaded");
 });
 
 add_task(function* test_is_allowed_file_scheme_access() {
   function backgroundScript() {
     browser.extension.isAllowedFileSchemeAccess().then(isAllowedFileSchemeAccess => {
-      browser.test.assertEq(true, isAllowedFileSchemeAccess, "isAllowedFileSchemeAccess is true");
+      browser.test.assertEq(false, isAllowedFileSchemeAccess, "isAllowedFileSchemeAccess is false");
       browser.test.notifyPass("isAllowedFileSchemeAccess");
     });
   }
 
   let extension = ExtensionTestUtils.loadExtension({
     background: `(${backgroundScript})()`,
     manifest: {},
   });