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
This commit is contained in:
Nikki Sharpley
2023-12-22 17:57:50 +00:00
parent a6f7c300e5
commit cae4c89958
13 changed files with 9 additions and 81 deletions

View File

@@ -18,9 +18,7 @@ function init(scope) {
}
function getFirefoxViewURL() {
return Services.prefs.getBoolPref("browser.tabs.firefox-view-next", true)
? "about:firefoxview-next"
: "about:firefoxview";
return "about:firefoxview";
}
function assertFirefoxViewTab(win) {

View File

@@ -3,33 +3,9 @@
/* import-globals-from ../head.js */
const FXVIEW_NEXT_ENABLED_PREF = "browser.tabs.firefox-view-next";
const FXVIEW_ENABLED_PREF = "browser.tabs.firefox-view";
add_task(async function about_firefoxview_next_pref() {
// Verify pref enables new Firefox view
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_NEXT_ENABLED_PREF, true]] });
await withFirefoxView({}, async browser => {
const { document } = browser.contentWindow;
is(document.location.href, "about:firefoxview-next");
});
// Verify pref enables new Firefox view even when old is disabled
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_ENABLED_PREF, false]] });
await withFirefoxView({}, async browser => {
const { document } = browser.contentWindow;
is(document.location.href, "about:firefoxview-next");
});
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_ENABLED_PREF, true]] });
// Verify pref disables new Firefox view
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_NEXT_ENABLED_PREF, false]] });
await withFirefoxView({}, async browser => {
const { document } = browser.contentWindow;
is(document.location.href, "about:firefoxview");
});
});
add_task(async function test_aria_roles() {
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_NEXT_ENABLED_PREF, true]] });
await withFirefoxView({}, async browser => {
const { document } = browser.contentWindow;
is(document.location.href, "about:firefoxview-next");
@@ -99,12 +75,6 @@ add_task(async function test_aria_roles() {
"Focus should be on button element of the synced tabs empty state"
);
});
// Verify pref disables new Firefox view
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_NEXT_ENABLED_PREF, false]] });
await withFirefoxView({}, async browser => {
const { document } = browser.contentWindow;
is(document.location.href, "about:firefoxview");
});
});
add_task(async function firefoxview_next_icon() {

View File

@@ -3,7 +3,6 @@
/* import-globals-from ../head.js */
const FXVIEW_NEXT_ENABLED_PREF = "browser.tabs.firefox-view-next";
const CARD_COLLAPSED_EVENT = [
["firefoxview_next", "card_collapsed", "card_container", undefined],
];
@@ -26,7 +25,6 @@ let enteredTelemetry = [
];
add_setup(async () => {
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_NEXT_ENABLED_PREF, true]] });
registerCleanupFunction(async () => {
await SpecialPowers.popPrefEnv();
clearHistory();
@@ -152,7 +150,6 @@ add_task(async function test_change_page_telemetry() {
});
add_task(async function test_browser_context_menu_telemetry() {
await SpecialPowers.pushPrefEnv({ set: [[FXVIEW_NEXT_ENABLED_PREF, true]] });
const menu = document.getElementById("contentAreaContextMenu");
await withFirefoxView({}, async browser => {
const { document } = browser.contentWindow;

View File

@@ -18,7 +18,6 @@ const SHOW_ALL_HISTORY_EVENT = [
["firefoxview_next", "show_all_history", "tabs", undefined],
];
const FXVIEW_NEXT_ENABLED_PREF = "browser.tabs.firefox-view-next";
const NEVER_REMEMBER_HISTORY_PREF = "browser.privatebrowsing.autostart";
const DAY_MS = 24 * 60 * 60 * 1000;
const today = new Date();
@@ -146,10 +145,7 @@ async function addHistoryItems(dateAdded) {
add_setup(async () => {
await SpecialPowers.pushPrefEnv({
set: [
[FXVIEW_NEXT_ENABLED_PREF, true],
["browser.firefox-view.search.enabled", true],
],
set: [["browser.firefox-view.search.enabled", true]],
});
registerCleanupFunction(async () => {
await SpecialPowers.popPrefEnv();

View File

@@ -9,7 +9,6 @@ ChromeUtils.defineESModuleGetters(globalThis, {
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
});
const FXVIEW_NEXT_ENABLED_PREF = "browser.tabs.firefox-view-next";
const NEVER_REMEMBER_HISTORY_PREF = "browser.privatebrowsing.autostart";
const SEARCH_ENABLED_PREF = "browser.firefox-view.search.enabled";
const RECENTLY_CLOSED_EVENT = [
@@ -230,10 +229,7 @@ async function recentlyClosedDismissTelemetry() {
add_setup(async () => {
await SpecialPowers.pushPrefEnv({
set: [
[FXVIEW_NEXT_ENABLED_PREF, true],
[SEARCH_ENABLED_PREF, true],
],
set: [[SEARCH_ENABLED_PREF, true]],
});
registerCleanupFunction(async () => {
await SpecialPowers.popPrefEnv();

View File

@@ -41,7 +41,6 @@ add_setup(async function () {
await SpecialPowers.pushPrefEnv({
set: [
["browser.tabs.firefox-view-next", true],
["services.sync.engine.tabs", true],
["identity.fxaccounts.enabled", true],
],

View File

@@ -15,9 +15,6 @@ add_setup(async function () {
registerCleanupFunction(async function () {
await tearDown(gSandbox);
});
await SpecialPowers.pushPrefEnv({
set: [["browser.tabs.firefox-view-next", true]],
});
});
add_task(async function test_unconfigured_initial_state() {