tor-browser

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

test_browserGlue_migration_remove_pref.js (775B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 const gBrowserGlue = Cc["@mozilla.org/browser/browserglue;1"].getService(
      7  Ci.nsIObserver
      8 );
      9 
     10 add_setup(() => {
     11  registerCleanupFunction(() => {
     12    Services.prefs.clearUserPref("browser.fixup.alternate.enabled");
     13  });
     14 });
     15 
     16 add_task(async function browser_fixup_alternate_enabled() {
     17  Services.prefs.setBoolPref("browser.fixup.alternate.enabled", true);
     18  Services.prefs.setIntPref("browser.migration.version", 139);
     19 
     20  gBrowserGlue.observe(null, "browser-glue-test", "force-ui-migration");
     21 
     22  Assert.ok(
     23    !Services.prefs.getBoolPref("browser.fixup.alternate.enabled", false),
     24    "browser.fixup.alternate.enabled pref should be cleared"
     25  );
     26 });