mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1778978 - Re-enable abouthomecache pref after running browser_experiments_api_control.js r=emcminn
The test disables the pref so that it can test the feature's interaction with Nimbus, but didn't re-enable the pref, so tests after it would break. Differential Revision: https://phabricator.services.mozilla.com/D151566
This commit is contained in:
parent
5b5d69a8c4
commit
5c5e53093e
@ -7,6 +7,8 @@ const { ExperimentFakes } = ChromeUtils.import(
|
||||
"resource://testing-common/NimbusTestUtils.jsm"
|
||||
);
|
||||
|
||||
const ENABLED_PREF = "browser.startup.homepage.abouthome_cache.enabled";
|
||||
|
||||
registerCleanupFunction(async () => {
|
||||
// When the test completes, make sure we cleanup with a populated cache,
|
||||
// since this is the default starting state for these tests.
|
||||
@ -21,9 +23,10 @@ registerCleanupFunction(async () => {
|
||||
*/
|
||||
add_task(async function test_experiments_api_control() {
|
||||
// User prefs take precedence over experiments and rollouts.
|
||||
Services.prefs.clearUserPref(
|
||||
"browser.startup.homepage.abouthome_cache.enabled"
|
||||
);
|
||||
Services.prefs.clearUserPref(ENABLED_PREF);
|
||||
registerCleanupFunction(() => {
|
||||
Services.prefs.setBoolPref(ENABLED_PREF, true);
|
||||
});
|
||||
|
||||
// First, the disabled case.
|
||||
await BrowserTestUtils.withNewTab("about:home", async browser => {
|
||||
|
Loading…
Reference in New Issue
Block a user