summaryrefslogtreecommitdiffstats
path: root/browser/components/tests/unit/test_browserGlue_migration_remove_pref.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/tests/unit/test_browserGlue_migration_remove_pref.js')
-rw-r--r--browser/components/tests/unit/test_browserGlue_migration_remove_pref.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/browser/components/tests/unit/test_browserGlue_migration_remove_pref.js b/browser/components/tests/unit/test_browserGlue_migration_remove_pref.js
new file mode 100644
index 0000000000..1178a2bd37
--- /dev/null
+++ b/browser/components/tests/unit/test_browserGlue_migration_remove_pref.js
@@ -0,0 +1,26 @@
+/* Any copyright is dedicated to the Public Domain.
+http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const gBrowserGlue = Cc["@mozilla.org/browser/browserglue;1"].getService(
+ Ci.nsIObserver
+);
+
+add_setup(() => {
+ registerCleanupFunction(() => {
+ Services.prefs.clearUserPref("browser.fixup.alternate.enabled");
+ });
+});
+
+add_task(async function browser_fixup_alternate_enabled() {
+ Services.prefs.setBoolPref("browser.fixup.alternate.enabled", true);
+ Services.prefs.setIntPref("browser.migration.version", 139);
+
+ gBrowserGlue.observe(null, "browser-glue-test", "force-ui-migration");
+
+ Assert.ok(
+ !Services.prefs.getBoolPref("browser.fixup.alternate.enabled", false),
+ "browser.fixup.alternate.enabled pref should be cleared"
+ );
+});