diff --git a/security/sandbox/test/browser_content_sandbox_fs_tests.js b/security/sandbox/test/browser_content_sandbox_fs_tests.js index bc933da2fe0c..dafb91b72243 100644 --- a/security/sandbox/test/browser_content_sandbox_fs_tests.js +++ b/security/sandbox/test/browser_content_sandbox_fs_tests.js @@ -411,20 +411,8 @@ async function testFileAccessLinuxOnly() { let configDir = GetHomeSubdir(".config"); const xdgConfigHome = GetEnvironmentVariable("XDG_CONFIG_HOME"); - let populateFakeXdgConfigHome = async aPath => { - const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm"); - await OS.File.makeDir(aPath, { unixMode: OS.Constants.S_IRWXU }); - ok(await OS.File.exists(aPath), `XDG_CONFIG_HOME ${aPath} was created`); - }; - - let unpopulateFakeXdgConfigHome = async aPath => { - const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm"); - await OS.File.removeDir(aPath); - }; if (xdgConfigHome.length > 1) { - await populateFakeXdgConfigHome(xdgConfigHome); - configDir = GetDir(xdgConfigHome); configDir.normalize(); @@ -635,7 +623,6 @@ async function testFileAccessLinuxOnly() { file: configDir, minLevel: minHomeReadSandboxLevel(), func: readDir, - cleanup: unpopulateFakeXdgConfigHome, }); } diff --git a/security/sandbox/test/browser_xdg.ini b/security/sandbox/test/browser_xdg.ini index c71ac87993b2..407644437c32 100644 --- a/security/sandbox/test/browser_xdg.ini +++ b/security/sandbox/test/browser_xdg.ini @@ -5,6 +5,8 @@ tags = contentsandbox support-files = browser_content_sandbox_utils.js browser_content_sandbox_fs_tests.js +test-directories = + /tmp/.xdg_config_home_test environment=XDG_CONFIG_HOME=/tmp/.xdg_config_home_test [browser_content_sandbox_fs_xdg.js]