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