summaryrefslogtreecommitdiffstats
path: root/browser/components/preferences
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/preferences')
-rw-r--r--browser/components/preferences/dialogs/connection.js7
-rw-r--r--browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml1
-rw-r--r--browser/components/preferences/fxaPairDevice.xhtml1
-rw-r--r--browser/components/preferences/main.inc.xhtml14
-rw-r--r--browser/components/preferences/main.js43
-rw-r--r--browser/components/preferences/preferences.js9
-rw-r--r--browser/components/preferences/preferences.xhtml3
-rw-r--r--browser/components/preferences/privacy.inc.xhtml6
-rw-r--r--browser/components/preferences/privacy.js78
-rw-r--r--browser/components/preferences/tests/browser.toml5
-rw-r--r--browser/components/preferences/tests/browser_bug731866.js9
-rw-r--r--browser/components/preferences/tests/browser_connection_system_wpad.js40
-rw-r--r--browser/components/preferences/tests/browser_keyboardfocus.js36
-rw-r--r--browser/components/preferences/tests/browser_primaryPassword.js3
-rw-r--r--browser/components/preferences/tests/browser_search_quickactions.js26
15 files changed, 214 insertions, 67 deletions
diff --git a/browser/components/preferences/dialogs/connection.js b/browser/components/preferences/dialogs/connection.js
index 33e8deb279..6d2623d65f 100644
--- a/browser/components/preferences/dialogs/connection.js
+++ b/browser/components/preferences/dialogs/connection.js
@@ -132,10 +132,11 @@ var gConnectionsDialog = {
if ("@mozilla.org/system-proxy-settings;1" in Cc) {
document.getElementById("systemPref").removeAttribute("hidden");
- var systemWpadAllowed = Preferences.get(
- "network.proxy.system_wpad.allowed"
+ var systemWpadAllowed = Services.prefs.getBoolPref(
+ "network.proxy.system_wpad.allowed",
+ false
);
- if (systemWpadAllowed && Services.appinfo.OS == "WINNT") {
+ if (systemWpadAllowed && AppConstants.platform == "win") {
document.getElementById("systemWpad").removeAttribute("hidden");
}
}
diff --git a/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml b/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml
index 2b041c4802..83bd09c0c3 100644
--- a/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml
+++ b/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml
@@ -26,7 +26,6 @@
rel="localization"
href="browser/preferences/preferences.ftl"
/>
- <html:link rel="localization" href="toolkit/branding/accounts.ftl" />
</linkset>
<script src="chrome://global/content/preferencesBindings.js" />
<script src="chrome://browser/content/preferences/dialogs/syncChooseWhatToSync.js" />
diff --git a/browser/components/preferences/fxaPairDevice.xhtml b/browser/components/preferences/fxaPairDevice.xhtml
index ad068b143d..ce988d289a 100644
--- a/browser/components/preferences/fxaPairDevice.xhtml
+++ b/browser/components/preferences/fxaPairDevice.xhtml
@@ -28,7 +28,6 @@
rel="localization"
href="browser/preferences/fxaPairDevice.ftl"
/>
- <html:link rel="localization" href="toolkit/branding/accounts.ftl" />
</linkset>
<script src="chrome://browser/content/preferences/fxaPairDevice.js" />
diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/preferences/main.inc.xhtml
index 1eb2189c41..fcf015a3b9 100644
--- a/browser/components/preferences/main.inc.xhtml
+++ b/browser/components/preferences/main.inc.xhtml
@@ -81,6 +81,14 @@
</hbox>
</groupbox>
+<groupbox id="dataBackupGroup" data-category="paneGeneral" hidden="true"
+ data-hidden-from-search="true">
+ <label><html:h2 data-l10n-id="settings-data-backup-header"/></label>
+ <hbox flex="1">
+ <html:backup-settings />
+ </hbox>
+</groupbox>
+
<!-- Tab preferences -->
<groupbox data-category="paneGeneral"
hidden="true">
@@ -384,7 +392,7 @@
<vbox id="translationsGroup" hidden="true" data-subcategory="translations">
<label><html:h2 data-l10n-id="translations-manage-header"/></label>
<hbox id="translations-manage-description" align="center">
- <description flex="1" data-l10n-id="translations-manage-intro"/>
+ <description flex="1" data-l10n-id="translations-manage-intro-2"/>
<button id="translations-manage-settings-button"
is="highlightable-button"
class="accessory-button"
@@ -393,9 +401,9 @@
<vbox>
<html:div id="translations-manage-install-list" hidden="true">
<hbox class="translations-manage-language">
- <label data-l10n-id="translations-manage-install-description"></label>
+ <label data-l10n-id="translations-manage-download-description"></label>
<button id="translations-manage-install-all"
- data-l10n-id="translations-manage-language-install-all-button"></button>
+ data-l10n-id="translations-manage-language-download-all-button"></button>
<button id="translations-manage-delete-all"
data-l10n-id="translations-manage-language-remove-all-button"></button>
</hbox>
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
index b578e0e29f..22bd3fe174 100644
--- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js
@@ -430,19 +430,29 @@ var gMainPane = {
"command",
gMainPane.onWindowsLaunchOnLoginChange
);
- NimbusFeatures.windowsLaunchOnLogin.recordExposureEvent({
- once: true,
- });
// We do a check here for startWithLastProfile as we could
// have disabled the pref for the user before they're ever
// exposed to the experiment on a new profile.
+ // If we're using MSIX, we don't show the checkbox as MSIX
+ // can't write to the registry.
if (
- NimbusFeatures.windowsLaunchOnLogin.getVariable("enabled") &&
Cc["@mozilla.org/toolkit/profile-service;1"].getService(
Ci.nsIToolkitProfileService
- ).startWithLastProfile
+ ).startWithLastProfile &&
+ !Services.sysinfo.getProperty("hasWinPackageId", false)
) {
- document.getElementById("windowsLaunchOnLoginBox").hidden = false;
+ NimbusFeatures.windowsLaunchOnLogin.recordExposureEvent({
+ once: true,
+ });
+
+ if (
+ Services.prefs.getBoolPref(
+ "browser.startup.windowsLaunchOnLogin.enabled",
+ false
+ )
+ ) {
+ document.getElementById("windowsLaunchOnLoginBox").hidden = false;
+ }
}
}
gMainPane.updateBrowserStartupUI =
@@ -521,6 +531,14 @@ var gMainPane = {
document.getElementById("dataMigrationGroup").remove();
}
+ if (
+ Services.prefs.getBoolPref("browser.backup.preferences.ui.enabled", false)
+ ) {
+ let backupGroup = document.getElementById("dataBackupGroup");
+ backupGroup.hidden = false;
+ backupGroup.removeAttribute("data-hidden-from-search");
+ }
+
// For media control toggle button, we support it on Windows, macOS and
// gtk-based Linux.
if (
@@ -1130,7 +1148,7 @@ var gMainPane = {
this.markAllDownloadPhases("downloaded");
} catch (error) {
TranslationsView.showError(
- "translations-manage-error-install",
+ "translations-manage-error-download",
error
);
await this.reloadDownloadPhases();
@@ -1167,7 +1185,7 @@ var gMainPane = {
this.updateDownloadPhase(langTag, "downloaded");
} catch (error) {
TranslationsView.showError(
- "translations-manage-error-install",
+ "translations-manage-error-download",
error
);
this.updateDownloadPhase(langTag, "uninstalled");
@@ -1221,7 +1239,7 @@ var gMainPane = {
document.l10n.setAttributes(
downloadButton,
- "translations-manage-language-install-button"
+ "translations-manage-language-download-button"
);
document.l10n.setAttributes(
deleteButton,
@@ -2237,9 +2255,8 @@ var gMainPane = {
// 1/2/4 values set via about:config should persist
return this._storedFullKeyboardNavigation;
}
- // When the checkbox is unchecked, this pref shouldn't exist
- // at all.
- return undefined;
+ // When the checkbox is unchecked, default to just text controls.
+ return 1;
},
/**
@@ -4202,7 +4219,7 @@ const AppearanceChooser = {
e.preventDefault();
break;
case "web-appearance-manage-themes-link":
- window.browsingContext.topChromeWindow.BrowserOpenAddonsMgr(
+ window.browsingContext.topChromeWindow.BrowserAddonUI.openAddonsMgr(
"addons://list/theme"
);
e.preventDefault();
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
index 0cd498fd96..34d6a9b11d 100644
--- a/browser/components/preferences/preferences.js
+++ b/browser/components/preferences/preferences.js
@@ -264,7 +264,7 @@ function init_all() {
return;
}
let mainWindow = window.browsingContext.topChromeWindow;
- mainWindow.BrowserOpenAddonsMgr();
+ mainWindow.BrowserAddonUI.openAddonsMgr();
});
document.dispatchEvent(
@@ -575,8 +575,9 @@ async function confirmRestartPrompt(
break;
}
- let buttonIndex = Services.prompt.confirmEx(
- window,
+ let button = await Services.prompt.asyncConfirmEx(
+ window.browsingContext,
+ Ci.nsIPrompt.MODAL_TYPE_CONTENT,
title,
msg,
buttonFlags,
@@ -587,6 +588,8 @@ async function confirmRestartPrompt(
{}
);
+ let buttonIndex = button.get("buttonNumClicked");
+
// If we have the second confirmation dialog for restart, see if the user
// cancels out at that point.
if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml
index 64062f1f77..4b1a62b578 100644
--- a/browser/components/preferences/preferences.xhtml
+++ b/browser/components/preferences/preferences.xhtml
@@ -49,7 +49,6 @@
<link rel="localization" href="browser/preferences/fonts.ftl"/>
<link rel="localization" href="browser/preferences/moreFromMozilla.ftl"/>
<link rel="localization" href="browser/preferences/preferences.ftl"/>
- <link rel="localization" href="toolkit/branding/accounts.ftl"/>
<link rel="localization" href="toolkit/branding/brandings.ftl"/>
<link rel="localization" href="toolkit/featuregates/features.ftl"/>
@@ -69,6 +68,7 @@
<link rel="localization" href="browser/translations.ftl"/>
<link rel="localization" href="preview/translations.ftl"/>
<link rel="localization" href="preview/enUS-searchFeatures.ftl"/>
+ <link rel="localization" href="preview/backupSettings.ftl"/>
<link rel="localization" href="security/certificates/certManager.ftl"/>
<link rel="localization" href="security/certificates/deviceManager.ftl"/>
<link rel="localization" href="toolkit/updates/history.ftl"/>
@@ -87,6 +87,7 @@
<script type="module" src="chrome://global/content/elements/moz-label.mjs"/>
<script type="module" src="chrome://global/content/elements/moz-card.mjs"></script>
<script type="module" src="chrome://global/content/elements/moz-button.mjs"></script>
+ <script type="module" src="chrome://browser/content/backup/backup-settings.mjs"></script>
</head>
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
diff --git a/browser/components/preferences/privacy.inc.xhtml b/browser/components/preferences/privacy.inc.xhtml
index 5c45771bc2..e93a027a0f 100644
--- a/browser/components/preferences/privacy.inc.xhtml
+++ b/browser/components/preferences/privacy.inc.xhtml
@@ -552,6 +552,12 @@
</hbox>
</vbox>
<vbox>
+ <hbox id="osReauthRow" align="center">
+ <checkbox id="osReauthCheckbox"
+ data-l10n-id="forms-os-reauth"/>
+ </hbox>
+ </vbox>
+ <vbox>
<hbox id="masterPasswordRow" align="center">
<checkbox id="useMasterPassword"
data-l10n-id="forms-primary-pw-use"
diff --git a/browser/components/preferences/privacy.js b/browser/components/preferences/privacy.js
index 89fed04e21..2d6fe7cacd 100644
--- a/browser/components/preferences/privacy.js
+++ b/browser/components/preferences/privacy.js
@@ -60,6 +60,10 @@ ChromeUtils.defineLazyGetter(this, "AlertsServiceDND", function () {
}
});
+ChromeUtils.defineLazyGetter(lazy, "AboutLoginsL10n", () => {
+ return new Localization(["branding/brand.ftl", "browser/aboutLogins.ftl"]);
+});
+
XPCOMUtils.defineLazyServiceGetter(
lazy,
"gParentalControlsService",
@@ -69,13 +73,6 @@ XPCOMUtils.defineLazyServiceGetter(
XPCOMUtils.defineLazyPreferenceGetter(
this,
- "OS_AUTH_ENABLED",
- "signon.management.page.os-auth.enabled",
- true
-);
-
-XPCOMUtils.defineLazyPreferenceGetter(
- this,
"gIsFirstPartyIsolated",
"privacy.firstparty.isolate",
false
@@ -1053,6 +1050,7 @@ var gPrivacyPane = {
this._initPasswordGenerationUI();
this._initRelayIntegrationUI();
this._initMasterPasswordUI();
+ this._initOSAuthentication();
this.initListenersForExtensionControllingPasswordManager();
@@ -2863,8 +2861,7 @@ var gPrivacyPane = {
// OS reauthenticate functionality is not available on Linux yet (bug 1527745)
if (
!LoginHelper.isPrimaryPasswordSet() &&
- OS_AUTH_ENABLED &&
- OSKeyStore.canReauth()
+ LoginHelper.getOSAuthEnabled(LoginHelper.OS_AUTH_FOR_PASSWORDS_PREF)
) {
// Uses primary-password-os-auth-dialog-message-win and
// primary-password-os-auth-dialog-message-macosx via concatenation:
@@ -2961,6 +2958,54 @@ var gPrivacyPane = {
this._updateRelayIntegrationUI();
},
+ async _toggleOSAuth() {
+ let osReauthCheckbox = document.getElementById("osReauthCheckbox");
+
+ const messageText = await lazy.AboutLoginsL10n.formatValue(
+ "about-logins-os-auth-dialog-message"
+ );
+ const captionText = await lazy.AboutLoginsL10n.formatValue(
+ "about-logins-os-auth-dialog-caption"
+ );
+ let win =
+ osReauthCheckbox.ownerGlobal.docShell.chromeEventHandler.ownerGlobal;
+
+ // Calling OSKeyStore.ensureLoggedIn() instead of LoginHelper.verifyOSAuth()
+ // since we want to authenticate user each time this stting is changed.
+ let isAuthorized = (
+ await OSKeyStore.ensureLoggedIn(messageText, captionText, win, false)
+ ).authenticated;
+ if (!isAuthorized) {
+ osReauthCheckbox.checked = !osReauthCheckbox.checked;
+ return;
+ }
+
+ // If osReauthCheckbox is checked enable osauth.
+ LoginHelper.setOSAuthEnabled(
+ LoginHelper.OS_AUTH_FOR_PASSWORDS_PREF,
+ osReauthCheckbox.checked
+ );
+ },
+
+ _initOSAuthentication() {
+ let osReauthCheckbox = document.getElementById("osReauthCheckbox");
+ if (!OSKeyStore.canReauth()) {
+ osReauthCheckbox.hidden = true;
+ return;
+ }
+
+ osReauthCheckbox.setAttribute(
+ "checked",
+ LoginHelper.getOSAuthEnabled(LoginHelper.OS_AUTH_FOR_PASSWORDS_PREF)
+ );
+
+ setEventListener(
+ "osReauthCheckbox",
+ "command",
+ gPrivacyPane._toggleOSAuth.bind(gPrivacyPane)
+ );
+ },
+
/**
* Shows the sites where the user has saved passwords and the associated login
* information.
@@ -3227,8 +3272,8 @@ var gPrivacyPane = {
initDataCollection() {
if (
!AppConstants.MOZ_DATA_REPORTING &&
- !NimbusFeatures.majorRelease2022.getVariable(
- "feltPrivacyShowPreferencesSection"
+ !Services.prefs.getBoolPref(
+ "browser.privacySegmentation.preferences.show"
)
) {
// Nothing to control in the data collection section, remove it.
@@ -3255,16 +3300,19 @@ var gPrivacyPane = {
// Section visibility
let section = document.getElementById("privacySegmentationSection");
let updatePrivacySegmentationSectionVisibilityState = () => {
- section.hidden = !NimbusFeatures.majorRelease2022.getVariable(
- "feltPrivacyShowPreferencesSection"
+ section.hidden = !Services.prefs.getBoolPref(
+ "browser.privacySegmentation.preferences.show"
);
};
- NimbusFeatures.majorRelease2022.onUpdate(
+ Services.prefs.addObserver(
+ "browser.privacySegmentation.preferences.show",
updatePrivacySegmentationSectionVisibilityState
);
+
window.addEventListener("unload", () => {
- NimbusFeatures.majorRelease2022.offUpdate(
+ Services.prefs.removeObserver(
+ "browser.privacySegmentation.preferences.show",
updatePrivacySegmentationSectionVisibilityState
);
});
diff --git a/browser/components/preferences/tests/browser.toml b/browser/components/preferences/tests/browser.toml
index 523110dbc9..07d9cc2880 100644
--- a/browser/components/preferences/tests/browser.toml
+++ b/browser/components/preferences/tests/browser.toml
@@ -72,6 +72,9 @@ skip-if = [
"verify && debug && os == 'mac'",
]
+["browser_connection_system_wpad.js"]
+run-if = ["os == 'win'"]
+
["browser_connection_valid_hostname.js"]
["browser_containers_name_input.js"]
@@ -293,4 +296,4 @@ support-files = [
["browser_warning_permanent_private_browsing.js"]
["browser_windows_launch_on_login.js"]
-run-if = ["os == 'win'"]
+run-if = ["(os == 'win' && !msix)"] # Disabled for MSIX due to https://bugzilla.mozilla.org/show_bug.cgi?id=1888263
diff --git a/browser/components/preferences/tests/browser_bug731866.js b/browser/components/preferences/tests/browser_bug731866.js
index b090535a49..e9ecd08a81 100644
--- a/browser/components/preferences/tests/browser_bug731866.js
+++ b/browser/components/preferences/tests/browser_bug731866.js
@@ -7,6 +7,9 @@ const browserContainersGroupDisabled = !SpecialPowers.getBoolPref(
const cookieBannerHandlingDisabled = !SpecialPowers.getBoolPref(
"cookiebanners.ui.desktop.enabled"
);
+const backupGroupDisabled = !SpecialPowers.getBoolPref(
+ "browser.backup.preferences.ui.enabled"
+);
const updatePrefContainers = ["updatesCategory", "updateApp"];
const updateContainersGroupDisabled =
AppConstants.platform === "win" &&
@@ -60,6 +63,12 @@ function checkElements(expectedPane) {
continue;
}
+ // Backup is currently disabled by default. (bug 1895791)
+ if (element.id == "dataBackupGroup" && backupGroupDisabled) {
+ is_element_hidden(element, "Disabled dataBackupGroup should be hidden");
+ continue;
+ }
+
let attributeValue = element.getAttribute("data-category");
let suffix = " (id=" + element.id + ")";
if (attributeValue == "pane" + expectedPane) {
diff --git a/browser/components/preferences/tests/browser_connection_system_wpad.js b/browser/components/preferences/tests/browser_connection_system_wpad.js
new file mode 100644
index 0000000000..87a3dbebae
--- /dev/null
+++ b/browser/components/preferences/tests/browser_connection_system_wpad.js
@@ -0,0 +1,40 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+add_task(async function test_system_wpad() {
+ await openPreferencesViaOpenPreferencesAPI("general", { leaveOpen: true });
+ const connectionURL =
+ "chrome://browser/content/preferences/dialogs/connection.xhtml";
+
+ registerCleanupFunction(function () {
+ Services.prefs.clearUserPref("network.proxy.system_wpad.allowed");
+ });
+
+ Services.prefs.setBoolPref("network.proxy.system_wpad.allowed", true);
+ let dialog = await openAndLoadSubDialog(connectionURL);
+ let dialogElement = dialog.document.getElementById("ConnectionsDialog");
+ let systemWpad = dialog.document.getElementById("systemWpad");
+ Assert.ok(!systemWpad.hidden, "Use system WPAD checkbox should be visible");
+ let dialogClosingPromise = BrowserTestUtils.waitForEvent(
+ dialogElement,
+ "dialogclosing"
+ );
+ dialogElement.cancelDialog();
+ await dialogClosingPromise;
+
+ Services.prefs.setBoolPref("network.proxy.system_wpad.allowed", false);
+ dialog = await openAndLoadSubDialog(connectionURL);
+ dialogElement = dialog.document.getElementById("ConnectionsDialog");
+ systemWpad = dialog.document.getElementById("systemWpad");
+ Assert.ok(systemWpad.hidden, "Use system WPAD checkbox should be hidden");
+ dialogClosingPromise = BrowserTestUtils.waitForEvent(
+ dialogElement,
+ "dialogclosing"
+ );
+ dialogElement.cancelDialog();
+ await dialogClosingPromise;
+
+ gBrowser.removeCurrentTab();
+});
diff --git a/browser/components/preferences/tests/browser_keyboardfocus.js b/browser/components/preferences/tests/browser_keyboardfocus.js
index bed452b679..89576b926a 100644
--- a/browser/components/preferences/tests/browser_keyboardfocus.js
+++ b/browser/components/preferences/tests/browser_keyboardfocus.js
@@ -13,40 +13,42 @@ add_task(async function () {
let checkbox = gBrowser.contentDocument.querySelector(
"#useFullKeyboardNavigation"
);
- Assert.ok(
- !Services.prefs.getIntPref("accessibility.tabfocus", undefined),
- "no pref value should exist"
+ Assert.equal(
+ Services.prefs.getIntPref("accessibility.tabfocus"),
+ 7,
+ "default should be full keyboard access"
);
Assert.ok(
- !checkbox.checked,
- "checkbox should be unchecked before clicking on checkbox"
+ checkbox.checked,
+ "checkbox should be checked before clicking on checkbox"
);
checkbox.click();
Assert.equal(
Services.prefs.getIntPref("accessibility.tabfocus"),
- 7,
+ 1,
"Prefstore should reflect checkbox's associated numeric value"
);
Assert.ok(
- checkbox.checked,
- "checkbox should be checked after clicking on checkbox"
+ !checkbox.checked,
+ "checkbox should be unchecked after clicking on checkbox"
);
checkbox.click();
Assert.ok(
- !checkbox.checked,
- "checkbox should be unchecked after clicking on checkbox"
+ checkbox.checked,
+ "checkbox should be checked after clicking on checkbox"
);
- Assert.ok(
- !Services.prefs.getIntPref("accessibility.tabfocus", undefined),
- "No pref value should exist"
+ Assert.equal(
+ Services.prefs.getIntPref("accessibility.tabfocus"),
+ 7,
+ "Should restore default value"
);
BrowserTestUtils.removeTab(gBrowser.selectedTab);
- SpecialPowers.pushPrefEnv({ set: [["accessibility.tabfocus", 4]] });
+ await SpecialPowers.pushPrefEnv({ set: [["accessibility.tabfocus", 4]] });
await launchPreferences();
checkbox = gBrowser.contentDocument.querySelector(
"#useFullKeyboardNavigation"
@@ -57,20 +59,20 @@ add_task(async function () {
"checkbox should stay unchecked after setting non-7 pref value"
);
Assert.equal(
- Services.prefs.getIntPref("accessibility.tabfocus", 0),
+ Services.prefs.getIntPref("accessibility.tabfocus"),
4,
"pref should have value in store"
);
BrowserTestUtils.removeTab(gBrowser.selectedTab);
- SpecialPowers.pushPrefEnv({ set: [["accessibility.tabfocus", 7]] });
+ await SpecialPowers.pushPrefEnv({ set: [["accessibility.tabfocus", 7]] });
await launchPreferences();
checkbox = gBrowser.contentDocument.querySelector(
"#useFullKeyboardNavigation"
);
Assert.equal(
- Services.prefs.getIntPref("accessibility.tabfocus", 0),
+ Services.prefs.getIntPref("accessibility.tabfocus"),
7,
"Pref value should update after modification"
);
diff --git a/browser/components/preferences/tests/browser_primaryPassword.js b/browser/components/preferences/tests/browser_primaryPassword.js
index 1162ca1290..2c42bd8d91 100644
--- a/browser/components/preferences/tests/browser_primaryPassword.js
+++ b/browser/components/preferences/tests/browser_primaryPassword.js
@@ -30,6 +30,9 @@ add_task(async function () {
isPrimaryPasswordSet() {
return primaryPasswordSet;
},
+ getOSAuthEnabled() {
+ return true; // Since enabled by default.
+ },
};
let checkbox = doc.querySelector("#useMasterPassword");
diff --git a/browser/components/preferences/tests/browser_search_quickactions.js b/browser/components/preferences/tests/browser_search_quickactions.js
index db938035ae..70799b5002 100644
--- a/browser/components/preferences/tests/browser_search_quickactions.js
+++ b/browser/components/preferences/tests/browser_search_quickactions.js
@@ -6,26 +6,26 @@
"use strict";
ChromeUtils.defineESModuleGetters(this, {
- UrlbarProviderQuickActions:
- "resource:///modules/UrlbarProviderQuickActions.sys.mjs",
+ ActionsProviderQuickActions:
+ "resource:///modules/ActionsProviderQuickActions.sys.mjs",
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.sys.mjs",
});
add_setup(async function setup() {
await SpecialPowers.pushPrefEnv({
set: [
- ["browser.urlbar.suggest.quickactions", true],
+ ["browser.urlbar.secondaryActions.featureGate", true],
["browser.urlbar.quickactions.enabled", true],
],
});
- UrlbarProviderQuickActions.addAction("testaction", {
+ ActionsProviderQuickActions.addAction("testaction", {
commands: ["testaction"],
label: "quickactions-downloads2",
});
registerCleanupFunction(() => {
- UrlbarProviderQuickActions.removeAction("testaction");
+ ActionsProviderQuickActions.removeAction("testaction");
});
});
@@ -61,15 +61,23 @@ add_task(async function test_show_prefs() {
await BrowserTestUtils.removeTab(tab);
});
-async function testActionIsShown(window) {
+async function testActionIsShown(window, name) {
await UrlbarTestUtils.promiseAutocompleteResultPopup({
window,
value: "testact",
waitForFocus: SimpleTest.waitForFocus,
});
try {
- let { result } = await UrlbarTestUtils.getDetailsOfResultAt(window, 1);
- return result.providerName == "quickactions";
+ await BrowserTestUtils.waitForMutationCondition(
+ window.document,
+ {},
+ () =>
+ !!window.document.querySelector(
+ `.urlbarView-action-btn[data-action=${name}]`
+ )
+ );
+ Assert.ok(true, `We found action "${name}"`);
+ return true;
} catch (e) {
return false;
}
@@ -100,7 +108,7 @@ add_task(async function test_prefs() {
});
Assert.ok(
- await testActionIsShown(window),
+ await testActionIsShown(window, "testaction"),
"Actions are shown after user clicks checkbox"
);