Bug 1393805 - Part 5 - Test that the system extensions dev dir is readable from content. r=bobowen
☠☠ backed out by 31d7cf3009c9 ☠ ☠
authorHaik Aftandilian <haftandilian@mozilla.com>
Wed, 27 Sep 2017 16:01:57 -0700
changeset 384556 4fe99f70e199cacff46a87deaa0ed55c4308dabe
parent 384555 1ba3220d84fa149de42ea996dac0472292069538
child 384557 9edb781a90587e4dbf15eb111b2c6a2faac3d5b3
push id32631
push userarchaeopteryx@coole-files.de
push dateThu, 05 Oct 2017 08:51:33 +0000
treeherdermozilla-central@66042a706980 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbobowen
bugs1393805
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1393805 - Part 5 - Test that the system extensions dev dir is readable from content. r=bobowen MozReview-Commit-ID: 7YN7S7R39CU
security/sandbox/test/browser_content_sandbox_fs.js
security/sandbox/test/browser_content_sandbox_utils.js
--- a/security/sandbox/test/browser_content_sandbox_fs.js
+++ b/security/sandbox/test/browser_content_sandbox_fs.js
@@ -400,16 +400,25 @@ async function testFileAccess() {
       desc:     "home dir",
       ok:       true,
       browser:  fileBrowser,
       file:     homeDir,
       minLevel: 0,
     });
   }
 
+  let sysExtDevDir = GetSystemExtensionsDevDir();
+  tests.push({
+    desc:     "system extensions dev dir",
+    ok:       true,
+    browser:  webBrowser,
+    file:     sysExtDevDir,
+    minLevel: 0,
+  });
+
   if (isWin()) {
     let extDir = GetPerUserExtensionDir();
     tests.push({
       desc:       "per-user extensions dir",
       ok:         true,
       browser:    webBrowser,
       file:       extDir,
       minLevel:   minHomeReadSandboxLevel(),
--- a/security/sandbox/test/browser_content_sandbox_utils.js
+++ b/security/sandbox/test/browser_content_sandbox_utils.js
@@ -66,16 +66,20 @@ function GetProfileDir() {
 }
 
 function GetHomeDir() {
   // get home directory
   let homeDir = Services.dirsvc.get("Home", Ci.nsIFile);
   return (homeDir);
 }
 
+function GetSystemExtensionsDevDir() {
+  return Services.dirsvc.get("XRESysExtDev", Ci.nsIFile);
+}
+
 function GetPerUserExtensionDir() {
   return Services.dirsvc.get("XREUSysExt", Ci.nsIFile);
 }
 
 // Returns a file object for the file or directory named |name| in the
 // profile directory.
 function GetProfileEntry(name) {
   let entry = GetProfileDir();