Skip to content

Commit c94ba22

Browse files
committed
Bug 1864534 - remove firefox-view-next pref and update about AboutRedirector r=fxview-reviewers,Gijs
- removes about:firefoxview-next route - about:firefoxview now points to firefoxview-next.html (until we rename) - remove pref for browser.tabs.firefox-view-next - preserve pref for browser.tabs.firefox-view-newIcon as part of firefoxViewNext feature manifest (until experiment is over) Depends on D196080 Differential Revision: https://phabricator.services.mozilla.com/D196093
1 parent bc999c0 commit c94ba22

File tree

13 files changed

+9
-81
lines changed

13 files changed

+9
-81
lines changed

browser/app/profile/firefox.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,6 @@ pref("browser.tabs.tooltipsShowPidAndActiveness", false);
908908
#endif
909909

910910
pref("browser.tabs.firefox-view", true);
911-
pref("browser.tabs.firefox-view-next", true);
912911
pref("browser.tabs.firefox-view-newIcon", true);
913912
pref("browser.tabs.firefox-view.logLevel", "Warn");
914913
pref("browser.tabs.firefox-view.notify-for-tabs", false);

browser/base/content/browser.js

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9968,7 +9968,6 @@ var FirefoxViewHandler = {
99689968
this._updateEnabledState = this._updateEnabledState.bind(this);
99699969
this._updateEnabledState();
99709970
NimbusFeatures.majorRelease2022.onUpdate(this._updateEnabledState);
9971-
NimbusFeatures.firefoxViewNext.onUpdate(this._updateEnabledState);
99729971

99739972
ChromeUtils.defineESModuleGetters(this, {
99749973
SyncedTabs: "resource://services-sync/SyncedTabs.sys.mjs",
@@ -9979,12 +9978,9 @@ var FirefoxViewHandler = {
99799978
CustomizableUI.removeListener(this);
99809979
Services.obs.removeObserver(this, "firefoxview-notification-dot-update");
99819980
NimbusFeatures.majorRelease2022.offUpdate(this._updateEnabledState);
9982-
NimbusFeatures.firefoxViewNext.offUpdate(this._updateEnabledState);
99839981
},
99849982
_updateEnabledState() {
9985-
this._enabled =
9986-
NimbusFeatures.majorRelease2022.getVariable("firefoxView") ||
9987-
NimbusFeatures.firefoxViewNext.getVariable("enabled");
9983+
this._enabled = NimbusFeatures.majorRelease2022.getVariable("firefoxView");
99889984
// We use a root attribute because there's no guarantee the button is in the
99899985
// DOM, and visibility changes need to take effect even if it isn't in the DOM
99909986
// right now.
@@ -10019,9 +10015,7 @@ var FirefoxViewHandler = {
1001910015
CustomizableUI.getPlacementOfWidget("tabbrowser-tabs").position
1002010016
);
1002110017
}
10022-
const viewURL = NimbusFeatures.firefoxViewNext.getVariable("enabled")
10023-
? "about:firefoxview-next"
10024-
: "about:firefoxview";
10018+
const viewURL = "about:firefoxview";
1002510019
// Need to account for navigation to Firefox View pages
1002610020
if (
1002710021
this.tab &&
@@ -10119,18 +10113,11 @@ var FirefoxViewHandler = {
1011910113
const PREF_NAME = "browser.firefox-view.view-count";
1012010114
const MAX_VIEW_COUNT = 10;
1012110115
let viewCount = Services.prefs.getIntPref(PREF_NAME, 0);
10122-
let isFirefoxViewNext = Services.prefs.getBoolPref(
10123-
"browser.tabs.firefox-view-next",
10124-
false
10125-
);
1012610116

1012710117
// Record telemetry
10128-
Services.telemetry.setEventRecordingEnabled(
10129-
isFirefoxViewNext ? "firefoxview_next" : "firefoxview",
10130-
true
10131-
);
10118+
Services.telemetry.setEventRecordingEnabled("firefoxview_next", true);
1013210119
Services.telemetry.recordEvent(
10133-
isFirefoxViewNext ? "firefoxview_next" : "firefoxview",
10120+
"firefoxview_next",
1013410121
"tab_selected",
1013510122
"toolbarbutton",
1013610123
null,

browser/components/about/AboutRedirector.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ static const RedirEntry kRedirMap[] = {
7474
nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
7575
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
7676
nsIAboutModule::IS_SECURE_CHROME_UI},
77-
{"firefoxview", "chrome://browser/content/firefoxview/firefoxview.html",
78-
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI |
79-
nsIAboutModule::HIDE_FROM_ABOUTABOUT},
80-
{"firefoxview-next",
77+
{"firefoxview",
8178
"chrome://browser/content/firefoxview/firefoxview-next.html",
8279
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI |
8380
nsIAboutModule::HIDE_FROM_ABOUTABOUT},

browser/components/firefoxview/tests/browser/FirefoxViewTestUtils.sys.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ function init(scope) {
1818
}
1919

2020
function getFirefoxViewURL() {
21-
return Services.prefs.getBoolPref("browser.tabs.firefox-view-next", true)
22-
? "about:firefoxview-next"
23-
: "about:firefoxview";
21+
return "about:firefoxview";
2422
}
2523

2624
function assertFirefoxViewTab(win) {

browser/components/firefoxview/tests/browser/firefoxview-next/browser_firefoxview_next.js

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,9 @@
33

44
/* import-globals-from ../head.js */
55

6-
const FXVIEW_NEXT_ENABLED_PREF = "browser.tabs.firefox-view-next";
76
const FXVIEW_ENABLED_PREF = "browser.tabs.firefox-view";
87

9-
add_task(async function about_firefoxview_next_pref() {
10-
// Verify pref enables new Firefox view
11-
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_NEXT_ENABLED_PREF, true]] });
12-
await withFirefoxView({}, async browser => {
13-
const { document } = browser.contentWindow;
14-
is(document.location.href, "about:firefoxview-next");
15-
});
16-
// Verify pref enables new Firefox view even when old is disabled
17-
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_ENABLED_PREF, false]] });
18-
await withFirefoxView({}, async browser => {
19-
const { document } = browser.contentWindow;
20-
is(document.location.href, "about:firefoxview-next");
21-
});
22-
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_ENABLED_PREF, true]] });
23-
// Verify pref disables new Firefox view
24-
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_NEXT_ENABLED_PREF, false]] });
25-
await withFirefoxView({}, async browser => {
26-
const { document } = browser.contentWindow;
27-
is(document.location.href, "about:firefoxview");
28-
});
29-
});
30-
318
add_task(async function test_aria_roles() {
32-
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_NEXT_ENABLED_PREF, true]] });
339
await withFirefoxView({}, async browser => {
3410
const { document } = browser.contentWindow;
3511
is(document.location.href, "about:firefoxview-next");
@@ -99,12 +75,6 @@ add_task(async function test_aria_roles() {
9975
"Focus should be on button element of the synced tabs empty state"
10076
);
10177
});
102-
// Verify pref disables new Firefox view
103-
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_NEXT_ENABLED_PREF, false]] });
104-
await withFirefoxView({}, async browser => {
105-
const { document } = browser.contentWindow;
106-
is(document.location.href, "about:firefoxview");
107-
});
10878
});
10979

11080
add_task(async function firefoxview_next_icon() {

browser/components/firefoxview/tests/browser/firefoxview-next/browser_firefoxview_next_general_telemetry.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
/* import-globals-from ../head.js */
55

6-
const FXVIEW_NEXT_ENABLED_PREF = "browser.tabs.firefox-view-next";
76
const CARD_COLLAPSED_EVENT = [
87
["firefoxview_next", "card_collapsed", "card_container", undefined],
98
];
@@ -26,7 +25,6 @@ let enteredTelemetry = [
2625
];
2726

2827
add_setup(async () => {
29-
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_NEXT_ENABLED_PREF, true]] });
3028
registerCleanupFunction(async () => {
3129
await SpecialPowers.popPrefEnv();
3230
clearHistory();
@@ -152,7 +150,6 @@ add_task(async function test_change_page_telemetry() {
152150
});
153151

154152
add_task(async function test_browser_context_menu_telemetry() {
155-
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_NEXT_ENABLED_PREF, true]] });
156153
const menu = document.getElementById("contentAreaContextMenu");
157154
await withFirefoxView({}, async browser => {
158155
const { document } = browser.contentWindow;

browser/components/firefoxview/tests/browser/firefoxview-next/browser_history_firefoxview_next.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const SHOW_ALL_HISTORY_EVENT = [
1818
["firefoxview_next", "show_all_history", "tabs", undefined],
1919
];
2020

21-
const FXVIEW_NEXT_ENABLED_PREF = "browser.tabs.firefox-view-next";
2221
const NEVER_REMEMBER_HISTORY_PREF = "browser.privatebrowsing.autostart";
2322
const DAY_MS = 24 * 60 * 60 * 1000;
2423
const today = new Date();
@@ -146,10 +145,7 @@ async function addHistoryItems(dateAdded) {
146145

147146
add_setup(async () => {
148147
await SpecialPowers.pushPrefEnv({
149-
set: [
150-
[FXVIEW_NEXT_ENABLED_PREF, true],
151-
["browser.firefox-view.search.enabled", true],
152-
],
148+
set: [["browser.firefox-view.search.enabled", true]],
153149
});
154150
registerCleanupFunction(async () => {
155151
await SpecialPowers.popPrefEnv();

browser/components/firefoxview/tests/browser/firefoxview-next/browser_recentlyclosed_firefoxview_next.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ ChromeUtils.defineESModuleGetters(globalThis, {
99
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
1010
});
1111

12-
const FXVIEW_NEXT_ENABLED_PREF = "browser.tabs.firefox-view-next";
1312
const NEVER_REMEMBER_HISTORY_PREF = "browser.privatebrowsing.autostart";
1413
const SEARCH_ENABLED_PREF = "browser.firefox-view.search.enabled";
1514
const RECENTLY_CLOSED_EVENT = [
@@ -230,10 +229,7 @@ async function recentlyClosedDismissTelemetry() {
230229

231230
add_setup(async () => {
232231
await SpecialPowers.pushPrefEnv({
233-
set: [
234-
[FXVIEW_NEXT_ENABLED_PREF, true],
235-
[SEARCH_ENABLED_PREF, true],
236-
],
232+
set: [[SEARCH_ENABLED_PREF, true]],
237233
});
238234
registerCleanupFunction(async () => {
239235
await SpecialPowers.popPrefEnv();

browser/components/firefoxview/tests/browser/firefoxview-next/browser_syncedtabs_errors_firefoxview_next.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ add_setup(async function () {
4141

4242
await SpecialPowers.pushPrefEnv({
4343
set: [
44-
["browser.tabs.firefox-view-next", true],
4544
["services.sync.engine.tabs", true],
4645
["identity.fxaccounts.enabled", true],
4746
],

browser/components/firefoxview/tests/browser/firefoxview-next/browser_syncedtabs_firefoxview_next.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ add_setup(async function () {
1515
registerCleanupFunction(async function () {
1616
await tearDown(gSandbox);
1717
});
18-
await SpecialPowers.pushPrefEnv({
19-
set: [["browser.tabs.firefox-view-next", true]],
20-
});
2118
});
2219

2320
add_task(async function test_unconfigured_initial_state() {

toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_click_element.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ let sandbox;
5959

6060
add_setup(async () => {
6161
await SpecialPowers.pushPrefEnv({
62-
set: [
63-
["browser.tabs.firefox-view", true],
64-
["browser.tabs.firefox-view-next", false],
65-
],
62+
set: [["browser.tabs.firefox-view", true]],
6663
});
6764

6865
sandbox = sinon.createSandbox();

toolkit/components/nimbus/FeatureManifest.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,10 +1887,6 @@ firefoxViewNext:
18871887
hasExposure: false
18881888
isEarlyStartup: true
18891889
variables:
1890-
enabled:
1891-
type: boolean
1892-
fallbackPref: "browser.tabs.firefox-view-next"
1893-
description: "Whether or not to enable the new Firefox View"
18941890
newIcon:
18951891
type: boolean
18961892
fallbackPref: "browser.tabs.firefox-view-newIcon"

toolkit/components/telemetry/app/TelemetryEnvironment.sys.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ const DEFAULT_ENVIRONMENT_PREFS = new Map([
235235
["browser.startup.homepage", { what: RECORD_PREF_STATE }],
236236
["browser.startup.page", { what: RECORD_PREF_VALUE }],
237237
["browser.tabs.firefox-view", { what: RECORD_PREF_VALUE }],
238-
["browser.tabs.firefox-view-next", { what: RECORD_PREF_VALUE }],
239238
["browser.urlbar.autoFill", { what: RECORD_DEFAULTPREF_VALUE }],
240239
[
241240
"browser.urlbar.autoFill.adaptiveHistory.enabled",

0 commit comments

Comments
 (0)