diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index e2723c51258e..9f07fb80a5b7 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -9398,10 +9398,8 @@ var ConfirmationHint = { }; function reportRemoteSubframesEnabledTelemetry() { - let autostart = Services.prefs.getBoolPref("fission.autostart"); - let categoryLabel = gFissionBrowser ? "Enabled" : "Disabled"; - if (autostart == gFissionBrowser) { + if (gFissionBrowser == Services.appinfo.fissionAutostart) { categoryLabel += "ByAutostart"; } else { categoryLabel += "ByUser"; @@ -9416,8 +9414,7 @@ if (AppConstants.NIGHTLY_BUILD) { var FissionTestingUI = { init() { // Handle the Fission/Non-Fission testing UI. - let autostart = Services.prefs.getBoolPref("fission.autostart"); - if (!autostart) { + if (!Services.appinfo.fissionAutostart) { return; } diff --git a/browser/base/content/test/performance/browser_startup_flicker.js b/browser/base/content/test/performance/browser_startup_flicker.js index bb57184541eb..4b30593f67dd 100644 --- a/browser/base/content/test/performance/browser_startup_flicker.js +++ b/browser/base/content/test/performance/browser_startup_flicker.js @@ -10,7 +10,7 @@ add_task(async function() { const isWebRenderEnabled = Services.prefs.getBoolPref("gfx.webrender.all"); - const isFissionEnabled = Services.prefs.getBoolPref("fission.autostart"); + const isFissionEnabled = SpecialPowers.useRemoteSubframes; if (isFissionEnabled && !isWebRenderEnabled) { // This configuration is not supported. // Also, in this specific configuration, we're displaying a warning, which looks like a flicker. diff --git a/browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow_targetSwitch.js b/browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow_targetSwitch.js index adf92673fc4d..68eef3277a36 100644 --- a/browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow_targetSwitch.js +++ b/browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow_targetSwitch.js @@ -108,7 +108,7 @@ add_task(async () => { // Navigate to an url that should switch to another target // when fission is enabled. - if (Services.prefs.getBoolPref("fission.autostart")) { + if (SpecialPowers.useRemoteSubframes) { info("Navigate to another page running on content process"); await navigateTo(CONTENT_PROCESS_PAGE2, tab, toolbox, extension); diff --git a/devtools/client/framework/devtools.js b/devtools/client/framework/devtools.js index 440637b931d6..2e65589c5504 100644 --- a/devtools/client/framework/devtools.js +++ b/devtools/client/framework/devtools.js @@ -52,7 +52,6 @@ const FORBIDDEN_IDS = new Set(["toolbox", ""]); const MAX_ORDINAL = 99; const CONTENT_FISSION_ENABLED_PREF = "devtools.contenttoolbox.fission"; -const FISSION_AUTOSTART_PREF = "fission.autostart"; /** * DevTools is a class that represents a set of developer tools, it holds a @@ -853,10 +852,7 @@ DevTools.prototype = { // Checking fission.autostart is not used to check if the current target // is a Fission tab, but only to check if the user is currently dogfooding // Fission. - const isFissionEnabled = Services.prefs.getBoolPref( - FISSION_AUTOSTART_PREF, - false - ); + const isFissionEnabled = Services.appinfo.fissionAutostart; this._cachedFissionContentToolboxEnabled = isFissionEnabled && isContentFissionEnabled; } diff --git a/layout/tools/reftest/manifest.jsm b/layout/tools/reftest/manifest.jsm index 42f2cdef4b52..d8df730e3918 100644 --- a/layout/tools/reftest/manifest.jsm +++ b/layout/tools/reftest/manifest.jsm @@ -612,7 +612,7 @@ function BuildConditionSandbox(aURL) { sandbox.verify = prefs.getBoolPref("reftest.verify", false); // Running with a variant enabled? - sandbox.fission = prefs.getBoolPref("fission.autostart", false); + sandbox.fission = Services.appinfo.fissionAutostart; sandbox.serviceWorkerE10s = prefs.getBoolPref("dom.serviceWorkers.parent_intercept", false); if (!g.dumpedConditionSandbox) { diff --git a/layout/tools/reftest/reftest.jsm b/layout/tools/reftest/reftest.jsm index d43d4f45efad..de4996d22e2c 100644 --- a/layout/tools/reftest/reftest.jsm +++ b/layout/tools/reftest/reftest.jsm @@ -162,11 +162,11 @@ function OnRefTestLoad(win) var env = Cc["@mozilla.org/process/environment;1"]. getService(Ci.nsIEnvironment); + g.browserIsRemote = Services.appinfo.browserTabsRemoteAutostart; + g.browserIsFission = Services.appinfo.fissionAutostart; + var prefs = Cc["@mozilla.org/preferences-service;1"]. getService(Ci.nsIPrefBranch); - g.browserIsRemote = prefs.getBoolPref("browser.tabs.remote.autostart", false); - g.browserIsFission = prefs.getBoolPref("fission.autostart", false); - g.browserIsIframe = prefs.getBoolPref("reftest.browser.iframe.enabled", false); g.logLevel = prefs.getStringPref("reftest.logLevel", "info"); diff --git a/testing/marionette/harness/marionette_harness/tests/unit-tests.ini b/testing/marionette/harness/marionette_harness/tests/unit-tests.ini index 2f5aca71aa47..a776385b3321 100644 --- a/testing/marionette/harness/marionette_harness/tests/unit-tests.ini +++ b/testing/marionette/harness/marionette_harness/tests/unit-tests.ini @@ -10,6 +10,9 @@ # xpconnect tests [include:../../../../../js/xpconnect/tests/marionette/manifest.ini] +# xre tests +[include:../../../../../toolkit/xre/test/marionette/marionette.ini] + # searchservice tests [include:../../../../../browser/components/search/test/marionette/manifest.ini] diff --git a/testing/marionette/reftest.js b/testing/marionette/reftest.js index 4ef00764e334..a2f1ca9cc93c 100644 --- a/testing/marionette/reftest.js +++ b/testing/marionette/reftest.js @@ -28,8 +28,6 @@ XPCOMUtils.defineLazyGetter(this, "logger", () => Log.get()); const XHTML_NS = "http://www.w3.org/1999/xhtml"; const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; -const PREF_E10S = "browser.tabs.remote.autostart"; -const PREF_FISSION = "fission.autostart"; const SCREENSHOT_MODE = { unexpected: 0, @@ -75,8 +73,8 @@ reftest.Runner = class { this.isPrint = null; this.windowUtils = null; this.lastURL = null; - this.useRemoteTabs = Preferences.get(PREF_E10S); - this.useRemoteSubframes = Preferences.get(PREF_FISSION); + this.useRemoteTabs = Services.appinfo.browserTabsRemoteAutostart; + this.useRemoteSubframes = Services.appinfo.fissionAutostart; } /** diff --git a/testing/talos/talos/tests/devtools/addon/content/tests/head.js b/testing/talos/talos/tests/devtools/addon/content/tests/head.js index df6304f126db..3fdcc4041b70 100644 --- a/testing/talos/talos/tests/devtools/addon/content/tests/head.js +++ b/testing/talos/talos/tests/devtools/addon/content/tests/head.js @@ -180,7 +180,7 @@ exports.reloadPageAndLog = async function(name, toolbox, onReload) { }; exports.isFissionEnabled = function() { - return Services.prefs.getBoolPref("fission.autostart", false); + return Services.appinfo.fissionAutostart; }; exports.waitForTick = () => new Promise(res => setTimeout(res, 0)); diff --git a/toolkit/components/extensions/ExtensionXPCShellUtils.jsm b/toolkit/components/extensions/ExtensionXPCShellUtils.jsm index e14244d9c4fc..88f592606092 100644 --- a/toolkit/components/extensions/ExtensionXPCShellUtils.jsm +++ b/toolkit/components/extensions/ExtensionXPCShellUtils.jsm @@ -89,15 +89,8 @@ ActorManagerParent.flush(); const { promiseDocumentLoaded, promiseEvent, promiseObserved } = ExtensionUtils; -var REMOTE_CONTENT_SCRIPTS = Services.prefs.getBoolPref( - "browser.tabs.remote.autostart", - false -); - -const REMOTE_CONTENT_SUBFRAMES = Services.prefs.getBoolPref( - "fission.autostart", - false -); +var REMOTE_CONTENT_SCRIPTS = Services.appinfo.browserTabsRemoteAutostart; +const REMOTE_CONTENT_SUBFRAMES = Services.appinfo.fissionAutostart; let BASE_MANIFEST = Object.freeze({ applications: Object.freeze({ diff --git a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm index 83ad59223073..6b0b3171b88d 100644 --- a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm +++ b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm @@ -172,7 +172,7 @@ const BackgroundPageThumbs = { }, get useFissionBrowser() { - return Services.prefs.getBoolPref("fission.autostart"); + return Services.appinfo.fissionAutostart; }, /** diff --git a/toolkit/components/url-classifier/tests/browser/classifierTester.js b/toolkit/components/url-classifier/tests/browser/classifierTester.js index 19679780a12c..5e281351a6b1 100644 --- a/toolkit/components/url-classifier/tests/browser/classifierTester.js +++ b/toolkit/components/url-classifier/tests/browser/classifierTester.js @@ -10,7 +10,6 @@ var classifierTester = { FLASHBLOCK_ENABLE_PREF: "plugins.flashBlock.enabled", FLASH_PLUGIN_USER_SETTING_PREF: "plugin.state.flash", URLCLASSIFIER_DISALLOW_COMPLETIONS_PREF: "urlclassifier.disallow_completions", - FISSION_PREF: "fission.autostart", NEVER_ACTIVATE_PREF_VALUE: 0, ASK_TO_ACTIVATE_PREF_VALUE: 1, ALWAYS_ACTIVATE_PREF_VALUE: 2, @@ -385,7 +384,7 @@ var classifierTester = { checkPluginInfo(pluginInfo, expectedClassification, flashSetting) { // Flashblocking is disabled when fission is enabled, so all the classifications // should be "unknown" - if (Services.prefs.getBoolPref(classifierTester.FISSION_PREF)) { + if (Services.appinfo.fissionAutostart) { expectedClassification = "unknown"; } diff --git a/toolkit/mozapps/extensions/content/pluginPrefs.js b/toolkit/mozapps/extensions/content/pluginPrefs.js index cae0a30ca1d5..2828a8dae309 100644 --- a/toolkit/mozapps/extensions/content/pluginPrefs.js +++ b/toolkit/mozapps/extensions/content/pluginPrefs.js @@ -55,7 +55,7 @@ function canDisableFlashProtectedMode(aPlugin) { } function canDisableFlashBlocking() { - return Services.prefs.getBoolPref("fission.autostart"); + return Services.appinfo.fissionAutostart; } function init() { diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build index 89d8416f3138..2ee6ef4b1d56 100644 --- a/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build @@ -15,6 +15,7 @@ if CONFIG['OS_ARCH'] == 'WINNT': MOCHITEST_MANIFESTS += ['test/mochitest.ini'] BROWSER_CHROME_MANIFESTS += ['test/browser.ini'] XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini'] +MARIONETTE_UNIT_MANIFESTS += ['test/marionette/marionette.ini'] XPIDL_SOURCES += [ 'nsINativeAppSupport.idl', diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index aae812d497f4..2db00ebc76cb 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -456,6 +456,86 @@ static ArgResult CheckArgExists(const char* aArg) { bool gSafeMode = false; bool gFxREmbedded = false; +// Fission enablement for the current session is determined once, at startup, +// and then remains the same for the duration of the session. +// +// The following factors determine whether or not Fission is enabled for a +// session, in order of precedence: +// +// - Safe mode: In safe mode, Fission is never enabled. +// +// - The MOZ_FORCE_ENABLE_FISSION environment variable: If set to any value, +// Fission will be enabled. +// +// - The following preferences: +// +// The current enrollment status as controlled by Normandy. This value is only +// stored in the default preference branch, and is not persisted across +// sessions by the preference service. It therefore isn't available early +// enough at startup, and needs to be synced to a preference in the user +// branch which is persisted across sessions. +static const char kPrefFissionExperimentEnrollmentStatus[] = + "fission.experiment.enrollmentStatus"; +// +// The enrollment status to be used at browser startup. This automatically +// synced from the above enrollmentStatus preference whenever the latter is +// changed. It can have any of the values defined in the +// `nsIXULRuntime_ExperimentStatus` enum. Meanings are documented in +// the declaration of `nsIXULRuntime.fissionExperimentStatus` +static const char kPrefFissionExperimentStartupEnrollmentStatus[] = + "fission.experiment.startupEnrollmentStatus"; +// +// The "fission.autostart" preference: If none of the above conditions apply, +// and the experiment enrollment status is unknown, then the value of the +// "fisison.autostart" preference is used. + +static nsIXULRuntime::ExperimentStatus FissionExperimentStatus() { + static nsIXULRuntime::ExperimentStatus sExperimentStatus = ([]() { + uint32_t value = + Preferences::GetUint(kPrefFissionExperimentStartupEnrollmentStatus); + if (value > + uint32_t(nsIXULRuntime::ExperimentStatus::eExperimentStatusMax)) { + return nsIXULRuntime::ExperimentStatus::eUnknown; + } + return nsIXULRuntime::ExperimentStatus(value); + })(); + + return sExperimentStatus; +} + +static void OnFissionEnrollmentStatusChanged(const char* aPref, void* aData) { + Preferences::SetUint( + kPrefFissionExperimentStartupEnrollmentStatus, + Preferences::GetUint(kPrefFissionExperimentEnrollmentStatus)); +} + +namespace mozilla { + +bool FissionAutostart() { + static bool sFissionAutostart = ([]() { + if (gSafeMode) { + return false; + } + + if (EnvHasValue("MOZ_FORCE_ENABLE_FISSION")) { + return true; + } + + switch (FissionExperimentStatus()) { + case nsIXULRuntime::ExperimentStatus::eEnrolledControl: + return false; + case nsIXULRuntime::ExperimentStatus::eEnrolledTreatment: + return true; + default: + return StaticPrefs::fission_autostart_AtStartup_DoNotUseDirectly(); + } + })(); + + return sFissionAutostart; +} + +} // namespace mozilla + /** * The nsXULAppInfo object implements nsIFactory so that it can be its own * singleton. @@ -775,6 +855,18 @@ nsXULAppInfo::Observe(nsISupports* aSubject, const char* aTopic, return NS_ERROR_FAILURE; } +NS_IMETHODIMP +nsXULAppInfo::GetFissionAutostart(bool* aResult) { + *aResult = FissionAutostart(); + return NS_OK; +} + +NS_IMETHODIMP +nsXULAppInfo::GetFissionExperimentStatus(ExperimentStatus* aResult) { + *aResult = FissionExperimentStatus(); + return NS_OK; +} + NS_IMETHODIMP nsXULAppInfo::GetBrowserTabsRemoteAutostart(bool* aResult) { *aResult = BrowserTabsRemoteAutostart(); @@ -4678,6 +4770,9 @@ nsresult XREMain::XRE_mainRun() { # endif // defined(MOZ_DEFAULT_BROWSER_AGENT) #endif + Preferences::RegisterCallback(&OnFissionEnrollmentStatusChanged, + kPrefFissionExperimentEnrollmentStatus); + #if defined(HAVE_DESKTOP_STARTUP_ID) && defined(MOZ_WIDGET_GTK) // Clear the environment variable so it won't be inherited by // child processes and confuse things. @@ -5201,12 +5296,6 @@ bool BrowserTabsRemoteAutostart() { return gBrowserTabsRemoteAutostart; } -bool FissionAutostart() { - return !gSafeMode && - (StaticPrefs::fission_autostart_AtStartup_DoNotUseDirectly() || - EnvHasValue("MOZ_FORCE_ENABLE_FISSION")); -} - uint32_t GetMaxWebProcessCount() { // multiOptOut is in int to allow us to run multiple experiments without // introducing multiple prefs a la the autostart.N prefs. diff --git a/toolkit/xre/test/marionette/marionette.ini b/toolkit/xre/test/marionette/marionette.ini new file mode 100644 index 000000000000..772c50d82266 --- /dev/null +++ b/toolkit/xre/test/marionette/marionette.ini @@ -0,0 +1 @@ +[test_fission_autostart.py] diff --git a/toolkit/xre/test/marionette/test_fission_autostart.py b/toolkit/xre/test/marionette/test_fission_autostart.py new file mode 100644 index 000000000000..09ec3f57a1d3 --- /dev/null +++ b/toolkit/xre/test/marionette/test_fission_autostart.py @@ -0,0 +1,175 @@ +from __future__ import absolute_import, print_function + +from marionette_harness import MarionetteTestCase + + +class ExperimentStatus: + UNKNOWN = 0 + ENROLLED_CONTROL = 1 + ENROLLED_TREATMENT = 2 + + +class Prefs: + ENROLLMENT_STATUS = 'fission.experiment.enrollmentStatus' + STARTUP_ENROLLMENT_STATUS = 'fission.experiment.startupEnrollmentStatus' + FISSION_AUTOSTART = 'fission.autostart' + + +ENV_ENABLE_FISSION = 'MOZ_FORCE_ENABLE_FISSION' + + +class TestFissionAutostart(MarionetteTestCase): + SANDBOX_NAME = 'fission-autostart' + + def execute_script(self, code, *args, **kwargs): + with self.marionette.using_context(self.marionette.CONTEXT_CHROME): + return self.marionette.execute_script(code, + new_sandbox=False, + sandbox=self.SANDBOX_NAME, + *args, **kwargs) + + def get_fission_status(self): + return self.execute_script(r''' + let win = Services.wm.getMostRecentWindow("navigator:browser"); + return { + fissionAutostart: Services.appinfo.fissionAutostart, + fissionExperimentStatus: Services.appinfo.fissionExperimentStatus, + useRemoteSubframes: win.docShell.nsILoadContext.useRemoteSubframes, + }; + ''') + + def check_fission_status(self, enabled, experiment): + expected = { + 'fissionAutostart': enabled, + 'fissionExperimentStatus': experiment, + 'useRemoteSubframes': enabled, + } + + status = self.get_fission_status() + + for prop, value in expected.items(): + self.assertEqual( + status[prop], value, + '%s should have the value `%r`, but has `%r`' + % (prop, value, status[prop])) + + def set_env(self, env, value): + self.execute_script('env.set(arguments[0], arguments[1]);', + script_args=(env, value)) + + def get_env(self, env): + return self.execute_script('return env.get(arguments[0]);', + script_args=(env,)) + + def set_enrollment_status(self, status): + self.marionette.set_pref(Prefs.ENROLLMENT_STATUS, + status, + default_branch=True) + + startup_status = self.marionette.get_pref( + Prefs.STARTUP_ENROLLMENT_STATUS) + self.assertEqual(startup_status, status, + 'Startup enrollment status (%r) should match new ' + 'session status (%r)' % (startup_status, status)) + + def restart(self, prefs=None, env=None): + if prefs: + self.marionette.set_prefs(prefs) + + if env: + for name, value in env.items(): + self.set_env(name, value) + + self.marionette.restart(in_app=True, clean=False) + self.setUpSession() + + # Sanity check our environment. + if prefs: + for key, val in prefs.items(): + self.assertEqual(self.marionette.get_pref(key), val) + if env: + for key, val in env.items(): + self.assertEqual(self.get_env(key), val or '') + + def setUpSession(self): + self.marionette.set_context(self.marionette.CONTEXT_CHROME) + + self.execute_script(r''' + // We're running in a function, in a sandbox, that inherits from an + // X-ray wrapped window. Anything we want to be globally available + // needs to be defined on that window. + ChromeUtils.import("resource://gre/modules/Services.jsm", window); + window.env = Cc["@mozilla.org/process/environment;1"] + .getService(Ci.nsIEnvironment); + ''') + + def setUp(self): + super(TestFissionAutostart, self).setUp() + + self.setUpSession() + + def tearDown(self): + self.marionette.restart(clean=True) + + super(TestFissionAutostart, self).tearDown() + + def test_runtime_changes(self): + """Tests that changes to preferences during runtime do not have any + effect on the current session.""" + + self.restart(prefs={Prefs.FISSION_AUTOSTART: True}) + + self.check_fission_status(enabled=True, + experiment=ExperimentStatus.UNKNOWN) + + self.set_enrollment_status(ExperimentStatus.ENROLLED_CONTROL) + self.check_fission_status(enabled=True, + experiment=ExperimentStatus.UNKNOWN) + + self.marionette.set_pref(Prefs.FISSION_AUTOSTART, + False) + self.check_fission_status(enabled=True, + experiment=ExperimentStatus.UNKNOWN) + + self.restart() + self.check_fission_status(enabled=False, + experiment=ExperimentStatus.ENROLLED_CONTROL) + + self.marionette.set_pref(Prefs.ENROLLMENT_STATUS, + ExperimentStatus.UNKNOWN, + default_branch=True) + self.check_fission_status(enabled=False, + experiment=ExperimentStatus.ENROLLED_CONTROL) + + self.set_env(ENV_ENABLE_FISSION, '1') + self.check_fission_status(enabled=False, + experiment=ExperimentStatus.ENROLLED_CONTROL) + + def test_fission_precedence(self): + self.restart(prefs={Prefs.FISSION_AUTOSTART: False}, + env={ENV_ENABLE_FISSION: '1'}) + self.check_fission_status(enabled=True, + experiment=ExperimentStatus.UNKNOWN) + + self.restart(prefs={Prefs.FISSION_AUTOSTART: True}, + env={ENV_ENABLE_FISSION: ''}) + self.check_fission_status(enabled=True, + experiment=ExperimentStatus.UNKNOWN) + + self.restart(prefs={Prefs.FISSION_AUTOSTART: False}) + self.check_fission_status(enabled=False, + experiment=ExperimentStatus.UNKNOWN) + + self.set_enrollment_status(ExperimentStatus.ENROLLED_TREATMENT) + self.restart() + self.check_fission_status(enabled=True, + experiment=ExperimentStatus.ENROLLED_TREATMENT) + + self.set_enrollment_status(ExperimentStatus.ENROLLED_CONTROL) + self.restart() + self.check_fission_status(enabled=False, + experiment=ExperimentStatus.ENROLLED_CONTROL) + + self.restart(prefs={Prefs.FISSION_AUTOSTART: True}) + self.check_fission_status(enabled=False, + experiment=ExperimentStatus.ENROLLED_CONTROL) diff --git a/widget/tests/browser/browser_test_procinfo.js b/widget/tests/browser/browser_test_procinfo.js index 43051351ab91..37041916d63f 100644 --- a/widget/tests/browser/browser_test_procinfo.js +++ b/widget/tests/browser/browser_test_procinfo.js @@ -11,7 +11,7 @@ const MAC = AppConstants.platform == "macosx"; const HAS_THREAD_NAMES = AppConstants.platform != "win" || AppConstants.isPlatformAndVersionAtLeast("win", 10); -const isFissionEnabled = Services.prefs.getBoolPref("fission.autostart"); +const isFissionEnabled = SpecialPowers.useRemoteSubframes; const SAMPLE_SIZE = 10; diff --git a/xpcom/system/nsIXULRuntime.idl b/xpcom/system/nsIXULRuntime.idl index 28eab662effe..505c3c764d7a 100644 --- a/xpcom/system/nsIXULRuntime.idl +++ b/xpcom/system/nsIXULRuntime.idl @@ -41,6 +41,47 @@ interface nsIXULRuntime : nsISupports */ readonly attribute boolean inSafeMode; + /** + * The status of a given experiment, as stored in a preference by Normandy. + */ + cenum ExperimentStatus : 8 { + // The experiment status is unknown, and behavior should not be modified. + eUnknown = 0, + // The user is enrolled in the control group, and should see the default + // behavior. + eEnrolledControl = 1, + // The user is enrolled in the treatment group, and should see the + // experimental behavior which is being tested. + eEnrolledTreatment = 2, + eExperimentStatusMax = 2, + }; + + /** + * Whether Fission should be automatically enabled for new browser windows. + * + * This value is guaranteed to remain constant for the length of a browser + * session. + */ + readonly attribute boolean fissionAutostart; + + /** + * The user's enrollment status in the Fission rollout experiment. May be + * one of: + * + * - eUnknown: The user's enrollment status is unknown, and the experiment + * should be ignored. + * + * - eEnrolledControl: The user is enrolled in the control group, and Fission + * should be disabled. + * + * - eEnrolledTreatment: The user is enrolled in the treatment group, and + * Fission should be enabled. + * + * This value is guaranteed to remain constant for the length of a browser + * session. + */ + readonly attribute nsIXULRuntime_ExperimentStatus fissionExperimentStatus; + /** * Whether to write console errors to a log file. If a component * encounters startup errors that might prevent the app from showing