tor-browser

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

test_autoconfig_custom_path.js (687B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 const { updateAppInfo } = ChromeUtils.importESModule(
      5  "resource://testing-common/AppInfo.sys.mjs"
      6 );
      7 
      8 function run_test() {
      9  let testDirName = do_get_cwd().clone();
     10  Services.env.set("MOZ_SYSTEM_CONFIG_DIR", testDirName.path);
     11 
     12  updateAppInfo();
     13 
     14  try {
     15    Services.dirsvc.undefine("SysConfD");
     16  } catch (e) {}
     17  let customSysConfD = Services.dirsvc.get("SysConfD", Ci.nsIFile);
     18  let parent = customSysConfD.parent;
     19  let child = customSysConfD.leafName;
     20  notEqual("/etc", parent.path, "SysConfD is not in /etc");
     21  equal("xpcshell", child, "SysConfD is xpcshell");
     22 }