Skip to content

Commit a9afdf5

Browse files
committed
Revert "Bug 1944147 - Option to turn off newtab for automated tests and other automation. r=mconley" for causing bc failures on browser_preloading_tab_moving.js
This reverts commit 00d4986.
1 parent 7260b45 commit a9afdf5

File tree

3 files changed

+5
-72
lines changed

3 files changed

+5
-72
lines changed

browser/modules/AboutNewTab.sys.mjs

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const PREF_ACTIVITY_STREAM_DEBUG = "browser.newtabpage.activity-stream.debug";
2121
// AboutHomeStartupCache needs us in "quit-application", so stay alive longer.
2222
// TODO: We could better have a shared async shutdown blocker?
2323
const TOPIC_APP_QUIT = "profile-before-change";
24-
const PREF_SHOULD_INITIALIZE = "browser.newtabpage.shouldInitialize";
2524

2625
export const AboutNewTab = {
2726
QueryInterface: ChromeUtils.generateQI([
@@ -51,16 +50,6 @@ export const AboutNewTab = {
5150
return;
5251
}
5352

54-
// For tests/automation: when false, newtab won't initialize in this session.
55-
// Flipping after initialization has no effect on the current session.
56-
const shouldInitialize = Services.prefs.getBoolPref(
57-
PREF_SHOULD_INITIALIZE,
58-
true
59-
);
60-
if (!shouldInitialize) {
61-
return;
62-
}
63-
6453
Services.obs.addObserver(this, TOPIC_APP_QUIT);
6554
if (!AppConstants.RELEASE_OR_BETA) {
6655
XPCOMUtils.defineLazyPreferenceGetter(
@@ -249,16 +238,11 @@ export const AboutNewTab = {
249238
this.activityStream.uninit();
250239
this.activityStream = null;
251240
}
252-
try {
253-
Services.obs.removeObserver(this, TOPIC_APP_QUIT);
254-
Services.obs.removeObserver(
255-
this,
256-
lazy.TelemetryReportingPolicy.TELEMETRY_TOU_ACCEPTED_OR_INELIGIBLE
257-
);
258-
} catch (e) {
259-
// If init failed before registering these observers, removeObserver may throw.
260-
// Safe to ignore during shutdown.
261-
}
241+
Services.obs.removeObserver(this, TOPIC_APP_QUIT);
242+
Services.obs.removeObserver(
243+
this,
244+
lazy.TelemetryReportingPolicy.TELEMETRY_TOU_ACCEPTED_OR_INELIGIBLE
245+
);
262246

263247
this.initialized = false;
264248
},

browser/modules/test/browser/browser.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ https_first_disabled = true
7777
["browser_UsageTelemetry_uniqueOriginsVisitedInPast24Hours.js"]
7878
https_first_disabled = true
7979

80-
["browser_aboutnewtab_init_gate.js"]
81-
8280
["browser_preloading_tab_moving.js"]
8381

8482
["browser_taskbar_preview.js"]

browser/modules/test/browser/browser_aboutnewtab_init_gate.js

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)