Bug 1543696 - Don't set extensions.legacy.enabled on beta in browser_ext_themes_experiment.js. r=kmag
☠☠ backed out by 7dad55e9bd2b ☠ ☠
authorTim Nguyen <ntim.bugs@gmail.com>
Fri, 12 Apr 2019 19:20:47 +0000
changeset 469396 7f0e024013704d89e01b6f8103fbfd6ef5f0107b
parent 469395 2c4c3f7a6e7b1a4c1465295a501f1d86168a5f12
child 469397 7dad55e9bd2bd60ea5462c2cfa1281a82aa0a4b6
push id83124
push userntim.bugs@gmail.com
push dateSat, 13 Apr 2019 08:35:54 +0000
treeherderautoland@7f0e02401370 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1543696
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1543696 - Don't set extensions.legacy.enabled on beta in browser_ext_themes_experiment.js. r=kmag Differential Revision: https://phabricator.services.mozilla.com/D27153
toolkit/components/extensions/test/browser/browser_ext_themes_experiment.js
toolkit/components/extensions/test/browser/browser_ext_themes_warnings.js
--- a/toolkit/components/extensions/test/browser/browser_ext_themes_experiment.js
+++ b/toolkit/components/extensions/test/browser/browser_ext_themes_experiment.js
@@ -1,16 +1,18 @@
 "use strict";
 
 // This test checks whether the theme experiments work
 
 add_task(async function setup() {
-  await SpecialPowers.pushPrefEnv({
-    set: [["extensions.legacy.enabled", true]],
-  });
+  if (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS) {
+    await SpecialPowers.pushPrefEnv({
+      set: [["extensions.legacy.enabled", true]],
+    });
+  }
 });
 
 add_task(async function test_experiment_static_theme() {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       theme: {
         colors: {
           some_color_property: "#ff00ff",
--- a/toolkit/components/extensions/test/browser/browser_ext_themes_warnings.js
+++ b/toolkit/components/extensions/test/browser/browser_ext_themes_warnings.js
@@ -68,17 +68,21 @@ add_task(async function test_dynamic_the
       `Unrecognized theme property found: ${property}.such_property`
     );
   }
 
   await extension.unload();
 });
 
 add_task(async function test_experiment() {
-  Services.prefs.setBoolPref("extensions.legacy.enabled", true);
+  if (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS) {
+    await SpecialPowers.pushPrefEnv({
+      set: [["extensions.legacy.enabled", true]],
+    });
+  }
 
   info("Testing that experiments are handled correctly when legacy pref is enabled");
 
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       theme: {
         properties: {
           such_property: "much_wow",
@@ -102,17 +106,19 @@ add_task(async function test_experiment(
       extension.startup,
       "Unrecognized theme property found: properties.unknown_property"
     );
   }
   await extension.unload();
 
   info("Testing that experiments are handled correctly when legacy pref is disabled");
 
-  Services.prefs.setBoolPref("extensions.legacy.enabled", false);
+  if (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS) {
+    await SpecialPowers.popPrefEnv();
+  }
 
   extension = ExtensionTestUtils.loadExtension({
     manifest: {
       theme: {
         properties: {
           such_property: "much_wow",
         },
       },