tor-browser

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

browser_content_sandbox_fs_xdg_mozLegacyHome.js (1300B)


      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  const xdgConfigHome = Services.env.exists("XDG_CONFIG_HOME");
     22  Assert.equal(xdgConfigHome, true, "XDG_CONFIG_HOME is defined");
     23 
     24  if (isXdgEnabled()) {
     25    const mozLegacyHome = Services.env.get("MOZ_LEGACY_HOME");
     26    Assert.equal(mozLegacyHome, 1, "MOZ_LEGACY_HOME is set to 1");
     27  }
     28 
     29  // If it is there, do actual testing
     30  sanityChecks();
     31 });
     32 
     33 add_task(async function () {
     34  // Make sure we dont break others.
     35  add_task(testFileAccessAllPlatforms); // eslint-disable-line no-undef
     36 
     37  // The linux only tests are the ones that can behave differently based on
     38  // existence of XDG_CONFIG_HOME
     39  add_task(testFileAccessLinuxOnly); // eslint-disable-line no-undef
     40 
     41  add_task(cleanupBrowserTabs); // eslint-disable-line no-undef
     42 });