Skip to content

Commit 81c08a3

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) - whitelist unreferenced files in `browser_all_files_referenced.js` as they will be removed in child Bug 1869833 Differential Revision: https://phabricator.services.mozilla.com/D196093
1 parent b55c07f commit 81c08a3

20 files changed

+58
-118
lines changed

browser/app/profile/firefox.js

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

907907
pref("browser.tabs.firefox-view", true);
908-
pref("browser.tabs.firefox-view-next", true);
909908
pref("browser.tabs.firefox-view-newIcon", true);
910909
pref("browser.tabs.firefox-view.logLevel", "Warn");
911910
pref("browser.tabs.firefox-view.notify-for-tabs", false);

browser/base/content/browser.js

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,6 @@ var gInitialPages = [
718718
"about:blank",
719719
"about:home",
720720
"about:firefoxview",
721-
"about:firefoxview-next",
722721
"about:newtab",
723722
"about:privatebrowsing",
724723
"about:sessionrestore",
@@ -9963,7 +9962,6 @@ var FirefoxViewHandler = {
99639962
this._updateEnabledState = this._updateEnabledState.bind(this);
99649963
this._updateEnabledState();
99659964
NimbusFeatures.majorRelease2022.onUpdate(this._updateEnabledState);
9966-
NimbusFeatures.firefoxViewNext.onUpdate(this._updateEnabledState);
99679965

99689966
ChromeUtils.defineESModuleGetters(this, {
99699967
SyncedTabs: "resource://services-sync/SyncedTabs.sys.mjs",
@@ -9974,12 +9972,9 @@ var FirefoxViewHandler = {
99749972
CustomizableUI.removeListener(this);
99759973
Services.obs.removeObserver(this, "firefoxview-notification-dot-update");
99769974
NimbusFeatures.majorRelease2022.offUpdate(this._updateEnabledState);
9977-
NimbusFeatures.firefoxViewNext.offUpdate(this._updateEnabledState);
99789975
},
99799976
_updateEnabledState() {
9980-
this._enabled =
9981-
NimbusFeatures.majorRelease2022.getVariable("firefoxView") ||
9982-
NimbusFeatures.firefoxViewNext.getVariable("enabled");
9977+
this._enabled = NimbusFeatures.majorRelease2022.getVariable("firefoxView");
99839978
// We use a root attribute because there's no guarantee the button is in the
99849979
// DOM, and visibility changes need to take effect even if it isn't in the DOM
99859980
// right now.
@@ -10014,9 +10009,7 @@ var FirefoxViewHandler = {
1001410009
CustomizableUI.getPlacementOfWidget("tabbrowser-tabs").position
1001510010
);
1001610011
}
10017-
const viewURL = NimbusFeatures.firefoxViewNext.getVariable("enabled")
10018-
? "about:firefoxview-next"
10019-
: "about:firefoxview";
10012+
const viewURL = "about:firefoxview";
1002010013
// Need to account for navigation to Firefox View pages
1002110014
if (
1002210015
this.tab &&
@@ -10111,18 +10104,11 @@ var FirefoxViewHandler = {
1011110104
const PREF_NAME = "browser.firefox-view.view-count";
1011210105
const MAX_VIEW_COUNT = 10;
1011310106
let viewCount = Services.prefs.getIntPref(PREF_NAME, 0);
10114-
let isFirefoxViewNext = Services.prefs.getBoolPref(
10115-
"browser.tabs.firefox-view-next",
10116-
false
10117-
);
1011810107

1011910108
// Record telemetry
10120-
Services.telemetry.setEventRecordingEnabled(
10121-
isFirefoxViewNext ? "firefoxview_next" : "firefoxview",
10122-
true
10123-
);
10109+
Services.telemetry.setEventRecordingEnabled("firefoxview_next", true);
1012410110
Services.telemetry.recordEvent(
10125-
isFirefoxViewNext ? "firefoxview_next" : "firefoxview",
10111+
"firefoxview_next",
1012610112
"tab_selected",
1012710113
"toolbarbutton",
1012810114
null,

browser/base/content/test/static/browser_all_files_referenced.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,16 @@ var allowlist = [
282282
{ file: "chrome://browser/content/screenshots/copy.svg" },
283283
{ file: "chrome://browser/content/screenshots/download.svg" },
284284
{ file: "chrome://browser/content/screenshots/download-white.svg" },
285+
286+
// Files removed in child patch for Bug 1869833
287+
{ file: "chrome://browser/content/firefoxview/firefoxview.css" },
288+
{ file: "chrome://browser/content/firefoxview/firefoxview.html" },
289+
{ file: "chrome://browser/content/firefoxview/firefoxview.mjs" },
290+
{ file: "chrome://browser/content/firefoxview/recently-closed-empty.svg" },
291+
{ file: "chrome://browser/content/firefoxview/recently-closed-tabs.mjs" },
292+
{ file: "chrome://browser/content/firefoxview/tab-pickup-container.mjs" },
293+
{ file: "chrome://browser/content/firefoxview/tab-pickup-empty.svg" },
294+
{ file: "chrome://browser/content/firefoxview/tab-pickup-list.mjs" },
285295
];
286296

287297
if (AppConstants.platform != "win") {

browser/components/BrowserGlue.sys.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,6 @@ let JSWINDOWACTORS = {
588588
"chrome://browser/content/places/historySidebar.xhtml",
589589
"chrome://browser/content/places/bookmarksSidebar.xhtml",
590590
"about:firefoxview",
591-
"about:firefoxview-next",
592591
],
593592
},
594593

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/card-container.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class CardContainer extends MozLitElement {
154154
<slot name="secondary-header"></slot>
155155
</span>
156156
<a
157-
href="about:firefoxview-next#${this.shortPageName}"
157+
href="about:firefoxview#${this.shortPageName}"
158158
@click=${this.viewAllClicked}
159159
class="view-all-link"
160160
data-l10n-id="firefoxview-view-all-link"
@@ -188,7 +188,7 @@ class CardContainer extends MozLitElement {
188188
<slot name="header"></slot>
189189
</summary>
190190
<a
191-
href="about:firefoxview-next#${this.shortPageName}"
191+
href="about:firefoxview#${this.shortPageName}"
192192
@click=${this.viewAllClicked}
193193
class="view-all-link"
194194
data-l10n-id="firefoxview-view-all-link"

browser/components/firefoxview/firefox-view-tabs-setup-manager.sys.mjs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ function openTabInWindow(window, url) {
5454
switchToTabHavingURI(url, true, {});
5555
}
5656

57-
function isFirefoxViewNext(window) {
58-
return window.location.pathname === "firefoxview-next";
59-
}
60-
6157
export const TabsSetupFlowManager = new (class {
6258
constructor() {
6359
this.QueryInterface = ChromeUtils.generateQI(["nsIObserver"]);
@@ -621,10 +617,12 @@ export const TabsSetupFlowManager = new (class {
621617
);
622618
this.didFxaTabOpen = true;
623619
openTabInWindow(window, url, true);
624-
const category = isFirefoxViewNext(window)
625-
? "firefoxview_next"
626-
: "firefoxview";
627-
Services.telemetry.recordEvent(category, "fxa_continue", "sync", null);
620+
Services.telemetry.recordEvent(
621+
"firefoxview_next",
622+
"fxa_continue",
623+
"sync",
624+
null
625+
);
628626
}
629627

630628
async openFxAPairDevice(window) {
@@ -633,12 +631,15 @@ export const TabsSetupFlowManager = new (class {
633631
});
634632
this.didFxaTabOpen = true;
635633
openTabInWindow(window, url, true);
636-
const category = isFirefoxViewNext(window)
637-
? "firefoxview_next"
638-
: "firefoxview";
639-
Services.telemetry.recordEvent(category, "fxa_mobile", "sync", null, {
640-
has_devices: this.secondaryDeviceConnected.toString(),
641-
});
634+
Services.telemetry.recordEvent(
635+
"firefoxview_next",
636+
"fxa_mobile",
637+
"sync",
638+
null,
639+
{
640+
has_devices: this.secondaryDeviceConnected.toString(),
641+
}
642+
);
642643
}
643644

644645
syncOpenTabs(containerElem) {

browser/components/firefoxview/recentlyclosed.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ class RecentlyClosedTabsInView extends ViewPage {
306306
"firefoxview-recentlyclosed-empty-description-two",
307307
];
308308
descriptionLink = {
309-
url: "about:firefoxview-next#history",
309+
url: "about:firefoxview#history",
310310
name: "history-url",
311311
sameTarget: "true",
312312
};

browser/components/firefoxview/syncedtabs.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ class SyncedTabsInView extends ViewPage {
679679
sendTabTelemetry(numTabs) {
680680
/*
681681
Services.telemetry.recordEvent(
682-
"firefoxview-next",
682+
"firefoxview_next",
683683
"synced_tabs",
684684
"tabs",
685685
null,

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: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,12 @@
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;
35-
is(document.location.href, "about:firefoxview-next");
11+
is(document.location.href, "about:firefoxview");
3612

3713
is(
3814
document.querySelector("main").getAttribute("role"),
@@ -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: 7 additions & 10 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();
@@ -39,7 +37,7 @@ add_task(async function firefox_view_entered_telemetry() {
3937
const { document } = browser.contentWindow;
4038
is(
4139
document.location.href,
42-
"about:firefoxview-next",
40+
"about:firefoxview",
4341
"The Recent browsing page is showing."
4442
);
4543
let enteredAndTabSelectedEvents = [tabSelectedTelemetry, enteredTelemetry];
@@ -71,7 +69,7 @@ add_task(async function test_collapse_and_expand_card() {
7169
const { document } = browser.contentWindow;
7270
is(
7371
document.location.href,
74-
"about:firefoxview-next",
72+
"about:firefoxview",
7573
"The Recent browsing page is showing."
7674
);
7775

@@ -113,7 +111,7 @@ add_task(async function test_change_page_telemetry() {
113111
const { document } = browser.contentWindow;
114112
is(
115113
document.location.href,
116-
"about:firefoxview-next",
114+
"about:firefoxview",
117115
"The Recent browsing page is showing."
118116
);
119117
let changePageEvent = [
@@ -152,13 +150,12 @@ 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;
159156
is(
160157
document.location.href,
161-
"about:firefoxview-next",
158+
"about:firefoxview",
162159
"The Recent browsing page is showing."
163160
);
164161
await clearAllParentTelemetryEvents();
@@ -209,7 +206,7 @@ add_task(async function test_context_menu_new_window_telemetry() {
209206
const { document } = browser.contentWindow;
210207
is(
211208
document.location.href,
212-
"about:firefoxview-next",
209+
"about:firefoxview",
213210
"The Recent browsing page is showing."
214211
);
215212

@@ -265,7 +262,7 @@ add_task(async function test_context_menu_private_window_telemetry() {
265262
const { document } = browser.contentWindow;
266263
is(
267264
document.location.href,
268-
"about:firefoxview-next",
265+
"about:firefoxview",
269266
"The Recent browsing page is showing."
270267
);
271268

@@ -333,7 +330,7 @@ add_task(async function test_context_menu_delete_from_history_telemetry() {
333330
const { document } = browser.contentWindow;
334331
is(
335332
document.location.href,
336-
"about:firefoxview-next",
333+
"about:firefoxview",
337334
"The Recent browsing page is showing."
338335
);
339336

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

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

6-
const URL_BASE = "about:firefoxview-next#";
6+
const URL_BASE = "about:firefoxview#";
77

88
function assertCorrectPage(document, name, event) {
99
is(

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

Lines changed: 4 additions & 8 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();
@@ -153,10 +152,7 @@ async function addHistoryItems(dateAdded) {
153152

154153
add_setup(async () => {
155154
await SpecialPowers.pushPrefEnv({
156-
set: [
157-
[FXVIEW_NEXT_ENABLED_PREF, true],
158-
["browser.firefox-view.search.enabled", true],
159-
],
155+
set: [["browser.firefox-view.search.enabled", true]],
160156
});
161157
registerCleanupFunction(async () => {
162158
await SpecialPowers.popPrefEnv();
@@ -174,7 +170,7 @@ add_task(async function test_list_ordering() {
174170
await addHistoryItems(oneMonthAgo);
175171
await withFirefoxView({}, async browser => {
176172
const { document } = browser.contentWindow;
177-
is(document.location.href, "about:firefoxview-next");
173+
is(document.location.href, "about:firefoxview");
178174

179175
await navigateToCategoryAndWait(document, "history");
180176

@@ -268,7 +264,7 @@ add_task(async function test_empty_states() {
268264
await PlacesUtils.history.clear();
269265
await withFirefoxView({}, async browser => {
270266
const { document } = browser.contentWindow;
271-
is(document.location.href, "about:firefoxview-next");
267+
is(document.location.href, "about:firefoxview");
272268

273269
await navigateToCategoryAndWait(document, "history");
274270

@@ -406,7 +402,7 @@ add_task(async function test_show_all_history_telemetry() {
406402
await addHistoryItems(oneMonthAgo);
407403
await withFirefoxView({}, async browser => {
408404
const { document } = browser.contentWindow;
409-
is(document.location.href, "about:firefoxview-next");
405+
is(document.location.href, "about:firefoxview");
410406

411407
await navigateToCategoryAndWait(document, "history");
412408

0 commit comments

Comments
 (0)