tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

browser_content_sandbox_fs_xdg_xdgConfigHome.js (1186B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 * http://creativecommons.org/publicdomain/zero/1.0/ */
      3 /* import-globals-from browser_content_sandbox_utils.js */
      4 "use strict";
      5 
      6 Services.scriptloader.loadSubScript(
      7  "chrome://mochitests/content/browser/" +
      8    "security/sandbox/test/browser_content_sandbox_utils.js",
      9  this
     10 );
     11 
     12 Services.scriptloader.loadSubScript(
     13  "chrome://mochitests/content/browser/" +
     14    "security/sandbox/test/browser_content_sandbox_fs_tests.js",
     15  this
     16 );
     17 
     18 SimpleTest.requestCompleteLog();
     19 
     20 add_setup(async function setup() {
     21  // Ensure that XDG_CONFIG_HOME is there
     22  const xdgConfigHome = Services.env.get("XDG_CONFIG_HOME");
     23  Assert.greater(xdgConfigHome.length, 1, "XDG_CONFIG_HOME is defined");
     24 
     25  // If it is there, do actual testing
     26  sanityChecks();
     27 });
     28 
     29 add_task(async function () {
     30  // Make sure we dont break others.
     31  add_task(testFileAccessAllPlatforms); // eslint-disable-line no-undef
     32 
     33  // The linux only tests are the ones that can behave differently based on
     34  // existence of XDG_CONFIG_HOME
     35  add_task(testFileAccessLinuxOnly); // eslint-disable-line no-undef
     36 
     37  add_task(cleanupBrowserTabs); // eslint-disable-line no-undef
     38 });