summaryrefslogtreecommitdiffstats
path: root/browser/components/aboutlogins
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/aboutlogins')
-rw-r--r--browser/components/aboutlogins/AboutLoginsParent.sys.mjs11
-rw-r--r--browser/components/aboutlogins/content/components/login-item.css2
-rw-r--r--browser/components/aboutlogins/content/components/login-item.mjs2
-rw-r--r--browser/components/aboutlogins/content/components/login-list.css2
-rw-r--r--browser/components/aboutlogins/tests/browser/browser_alertDismissedAfterChangingPassword.js4
-rw-r--r--browser/components/aboutlogins/tests/browser/browser_createLogin.js186
-rw-r--r--browser/components/aboutlogins/tests/browser/browser_loginListChanges.js2
-rw-r--r--browser/components/aboutlogins/tests/browser/browser_openExport.js2
-rw-r--r--browser/components/aboutlogins/tests/browser/browser_openImportCSV.js10
-rw-r--r--browser/components/aboutlogins/tests/browser/browser_updateLogin.js186
-rw-r--r--browser/components/aboutlogins/tests/browser/browser_vulnerableLoginAddedInSecondaryWindow.js3
-rw-r--r--browser/components/aboutlogins/tests/chrome/aboutlogins_common.js2
-rw-r--r--browser/components/aboutlogins/tests/chrome/test_login_item.html2
13 files changed, 190 insertions, 224 deletions
diff --git a/browser/components/aboutlogins/AboutLoginsParent.sys.mjs b/browser/components/aboutlogins/AboutLoginsParent.sys.mjs
index 75b695cdd2..28f56c2172 100644
--- a/browser/components/aboutlogins/AboutLoginsParent.sys.mjs
+++ b/browser/components/aboutlogins/AboutLoginsParent.sys.mjs
@@ -442,7 +442,7 @@ export class AboutLoginsParent extends JSWindowActorParent {
},
]);
- fp.init(this.#ownerGlobal, title, Ci.nsIFilePicker.modeSave);
+ fp.init(this.browsingContext, title, Ci.nsIFilePicker.modeSave);
fp.appendFilter(csvFilterTitle, "*.csv");
fp.appendFilters(Ci.nsIFilePicker.filterAll);
fp.defaultString = defaultFilename;
@@ -479,8 +479,7 @@ export class AboutLoginsParent extends JSWindowActorParent {
title: tsvFilterTitle,
extensionPattern: "*.tsv",
},
- ],
- this.#ownerGlobal
+ ]
);
if (result != Ci.nsIFilePicker.returnCancel) {
@@ -526,10 +525,10 @@ export class AboutLoginsParent extends JSWindowActorParent {
this.sendAsyncMessage("AboutLogins:ShowLoginItemError", messageObject);
}
- async openFilePickerDialog(title, okButtonLabel, appendFilters, ownerGlobal) {
+ async openFilePickerDialog(title, okButtonLabel, appendFilters) {
return new Promise(resolve => {
let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
- fp.init(ownerGlobal, title, Ci.nsIFilePicker.modeOpen);
+ fp.init(this.browsingContext, title, Ci.nsIFilePicker.modeOpen);
for (const appendFilter of appendFilters) {
fp.appendFilter(appendFilter.title, appendFilter.extensionPattern);
}
@@ -843,7 +842,7 @@ class AboutLoginsInternal {
};
}
- onPasswordSyncEnabledPreferenceChange(data, previous, latest) {
+ onPasswordSyncEnabledPreferenceChange(_data, _previous, _latest) {
this.#messageSubscribers("AboutLogins:SyncState", this.getSyncState());
}
diff --git a/browser/components/aboutlogins/content/components/login-item.css b/browser/components/aboutlogins/content/components/login-item.css
index 07471c35ef..4a3d85d859 100644
--- a/browser/components/aboutlogins/content/components/login-item.css
+++ b/browser/components/aboutlogins/content/components/login-item.css
@@ -246,7 +246,7 @@ login-command-button {
.alert-title {
font-size: var(--font-size-xlarge);
- font-weight: var(--font-weight-default);
+ font-weight: var(--font-weight);
line-height: 1em;
margin-block: 0 12px;
}
diff --git a/browser/components/aboutlogins/content/components/login-item.mjs b/browser/components/aboutlogins/content/components/login-item.mjs
index fc7dffff8b..1c5358c714 100644
--- a/browser/components/aboutlogins/content/components/login-item.mjs
+++ b/browser/components/aboutlogins/content/components/login-item.mjs
@@ -437,7 +437,7 @@ export default class LoginItem extends HTMLElement {
this._recordTelemetryEvent({ object: "password", method });
}
- async handleCancelEvent(e) {
+ async handleCancelEvent(_e) {
let wasExistingLogin = !!this._login.guid;
if (wasExistingLogin) {
if (this.hasPendingChanges()) {
diff --git a/browser/components/aboutlogins/content/components/login-list.css b/browser/components/aboutlogins/content/components/login-list.css
index bc8e72a3cd..d16f621a9e 100644
--- a/browser/components/aboutlogins/content/components/login-list.css
+++ b/browser/components/aboutlogins/content/components/login-list.css
@@ -34,7 +34,7 @@
}
#login-sort > option {
- font-weight: var(--font-weight-default);
+ font-weight: var(--font-weight);
}
.count {
diff --git a/browser/components/aboutlogins/tests/browser/browser_alertDismissedAfterChangingPassword.js b/browser/components/aboutlogins/tests/browser/browser_alertDismissedAfterChangingPassword.js
index 944f852c18..b2b036121a 100644
--- a/browser/components/aboutlogins/tests/browser/browser_alertDismissedAfterChangingPassword.js
+++ b/browser/components/aboutlogins/tests/browser/browser_alertDismissedAfterChangingPassword.js
@@ -117,8 +117,8 @@ add_task(async function test_added_login_shows_breach_warning() {
await reauthObserved;
await SpecialPowers.spawn(
browser,
- [[TEST_LOGIN1.guid, VULNERABLE_TEST_LOGIN2.guid, TEST_LOGIN3.guid]],
- async ([regularLoginGuid, vulnerableLoginGuid, breachedLoginGuid]) => {
+ [[VULNERABLE_TEST_LOGIN2.guid, TEST_LOGIN3.guid]],
+ async ([vulnerableLoginGuid, breachedLoginGuid]) => {
let loginList = Cu.waiveXrays(
content.document.querySelector("login-list")
);
diff --git a/browser/components/aboutlogins/tests/browser/browser_createLogin.js b/browser/components/aboutlogins/tests/browser/browser_createLogin.js
index 2de24de952..4aac8cece1 100644
--- a/browser/components/aboutlogins/tests/browser/browser_createLogin.js
+++ b/browser/components/aboutlogins/tests/browser/browser_createLogin.js
@@ -54,100 +54,96 @@ add_task(async function test_create_login() {
(_, data) => data == "addLogin"
);
- await SpecialPowers.spawn(
- browser,
- [[originTuple, i]],
- async ([aOriginTuple, index]) => {
- let loginList = Cu.waiveXrays(
- content.document.querySelector("login-list")
- );
- let createButton = loginList._createLoginButton;
- Assert.ok(
- ContentTaskUtils.isHidden(loginList._blankLoginListItem),
- "the blank login list item should be hidden initially"
- );
- Assert.ok(
- !createButton.disabled,
- "Create button should not be disabled initially"
- );
+ await SpecialPowers.spawn(browser, [originTuple], async aOriginTuple => {
+ let loginList = Cu.waiveXrays(
+ content.document.querySelector("login-list")
+ );
+ let createButton = loginList._createLoginButton;
+ Assert.ok(
+ ContentTaskUtils.isHidden(loginList._blankLoginListItem),
+ "the blank login list item should be hidden initially"
+ );
+ Assert.ok(
+ !createButton.disabled,
+ "Create button should not be disabled initially"
+ );
- let loginItem = Cu.waiveXrays(
- content.document.querySelector("login-item")
- );
- let usernameInput = loginItem.shadowRoot.querySelector(
- "input[name='username']"
- );
- usernameInput.placeholder = "dummy placeholder";
+ let loginItem = Cu.waiveXrays(
+ content.document.querySelector("login-item")
+ );
+ let usernameInput = loginItem.shadowRoot.querySelector(
+ "input[name='username']"
+ );
+ usernameInput.placeholder = "dummy placeholder";
- createButton.click();
+ createButton.click();
- Assert.ok(
- ContentTaskUtils.isVisible(loginList._blankLoginListItem),
- "the blank login list item should be visible after clicking on the create button"
- );
- Assert.ok(
- createButton.disabled,
- "Create button should be disabled after being clicked"
- );
+ Assert.ok(
+ ContentTaskUtils.isVisible(loginList._blankLoginListItem),
+ "the blank login list item should be visible after clicking on the create button"
+ );
+ Assert.ok(
+ createButton.disabled,
+ "Create button should be disabled after being clicked"
+ );
- let cancelButton = loginItem.shadowRoot.querySelector(".cancel-button");
- Assert.ok(
- ContentTaskUtils.isVisible(cancelButton),
- "cancel button should be visible in create mode with no logins saved"
- );
+ let cancelButton = loginItem.shadowRoot.querySelector(".cancel-button");
+ Assert.ok(
+ ContentTaskUtils.isVisible(cancelButton),
+ "cancel button should be visible in create mode with no logins saved"
+ );
- let originInput = loginItem.shadowRoot.querySelector(
- "input[name='origin']"
- );
- let passwordInput = loginItem.shadowRoot.querySelector(
- "input[name='password']"
- );
+ let originInput = loginItem.shadowRoot.querySelector(
+ "input[name='origin']"
+ );
+ let passwordInput = loginItem.shadowRoot.querySelector(
+ "input[name='password']"
+ );
- // Upon clicking create-login-button, the origin input field is automatically focused.
- Assert.ok(
- ContentTaskUtils.isVisible(loginItem._originWarning),
- "The origin warning should be visible"
- );
+ // Upon clicking create-login-button, the origin input field is automatically focused.
+ Assert.ok(
+ ContentTaskUtils.isVisible(loginItem._originWarning),
+ "The origin warning should be visible"
+ );
- // At this moment, the password input field is not focused so no warning should be displayed.
- Assert.ok(
- ContentTaskUtils.isHidden(loginItem._passwordWarning),
- "The password warning should not be visible if the password input field is not focused"
- );
+ // At this moment, the password input field is not focused so no warning should be displayed.
+ Assert.ok(
+ ContentTaskUtils.isHidden(loginItem._passwordWarning),
+ "The password warning should not be visible if the password input field is not focused"
+ );
- Assert.equal(
- content.document.l10n.getAttributes(usernameInput).id,
- null,
- "there should be no placeholder id on the username input in edit mode"
- );
- Assert.equal(
- usernameInput.placeholder,
- "",
- "there should be no placeholder on the username input in edit mode"
- );
+ Assert.equal(
+ content.document.l10n.getAttributes(usernameInput).id,
+ null,
+ "there should be no placeholder id on the username input in edit mode"
+ );
+ Assert.equal(
+ usernameInput.placeholder,
+ "",
+ "there should be no placeholder on the username input in edit mode"
+ );
- originInput.value = aOriginTuple[0];
- usernameInput.value = "testuser1";
+ originInput.value = aOriginTuple[0];
+ usernameInput.value = "testuser1";
- passwordInput.focus();
- Assert.ok(
- ContentTaskUtils.isVisible(loginItem._passwordWarning),
- "The password warning should not visible"
- );
- passwordInput.value = "testpass1";
+ passwordInput.focus();
+ Assert.ok(
+ ContentTaskUtils.isVisible(loginItem._passwordWarning),
+ "The password warning should not visible"
+ );
+ passwordInput.value = "testpass1";
- // Since the password field is focused, the origin warning should not be displayed.
- Assert.ok(
- ContentTaskUtils.isHidden(loginItem._originWarning),
- "The origin warning should not be visible if the origin input field is not focused"
- );
+ // Since the password field is focused, the origin warning should not be displayed.
+ Assert.ok(
+ ContentTaskUtils.isHidden(loginItem._originWarning),
+ "The origin warning should not be visible if the origin input field is not focused"
+ );
- let saveChangesButton = loginItem.shadowRoot.querySelector(
- ".save-changes-button"
- );
- saveChangesButton.click();
- }
- );
+ let saveChangesButton = loginItem.shadowRoot.querySelector(
+ ".save-changes-button"
+ );
+ saveChangesButton.click();
+ });
info("waiting for login to get added to storage");
await storageChangedPromised;
@@ -239,7 +235,7 @@ add_task(async function test_create_login() {
let reauthObserved = forceAuthTimeoutAndWaitForOSKeyStoreLogin({
loginResult: true,
});
- await SpecialPowers.spawn(browser, [originTuple], async aOriginTuple => {
+ await SpecialPowers.spawn(browser, [], async () => {
let loginItem = Cu.waiveXrays(
content.document.querySelector("login-item")
);
@@ -250,7 +246,7 @@ add_task(async function test_create_login() {
info("waiting for oskeystore auth");
await reauthObserved;
- await SpecialPowers.spawn(browser, [originTuple], async aOriginTuple => {
+ await SpecialPowers.spawn(browser, [], async () => {
let loginItem = Cu.waiveXrays(
content.document.querySelector("login-item")
);
@@ -318,20 +314,14 @@ add_task(async function test_create_login() {
});
}
- await SpecialPowers.spawn(
- browser,
- [testCases.length],
- async testCasesLength => {
- let loginList = Cu.waiveXrays(
- content.document.querySelector("login-list")
- );
- Assert.equal(
- loginList._loginGuidsSortedOrder.length,
- 5,
- "login list should have a login per testcase"
- );
- }
- );
+ await SpecialPowers.spawn(browser, [], async () => {
+ let loginList = Cu.waiveXrays(content.document.querySelector("login-list"));
+ Assert.equal(
+ loginList._loginGuidsSortedOrder.length,
+ 5,
+ "login list should have a login per testcase"
+ );
+ });
});
add_task(async function test_cancel_create_login() {
diff --git a/browser/components/aboutlogins/tests/browser/browser_loginListChanges.js b/browser/components/aboutlogins/tests/browser/browser_loginListChanges.js
index 13df6c1ef6..94cf1c24bb 100644
--- a/browser/components/aboutlogins/tests/browser/browser_loginListChanges.js
+++ b/browser/components/aboutlogins/tests/browser/browser_loginListChanges.js
@@ -73,7 +73,7 @@ add_task(async function test_login_removed() {
.getActor("AboutLogins")
.sendAsyncMessage("AboutLogins:LoginRemoved", login);
- await SpecialPowers.spawn(browser, [login], async removedLogin => {
+ await SpecialPowers.spawn(browser, [], async () => {
let loginList = Cu.waiveXrays(content.document.querySelector("login-list"));
let loginRemoved = await ContentTaskUtils.waitForCondition(() => {
return !loginList._loginGuidsSortedOrder.length;
diff --git a/browser/components/aboutlogins/tests/browser/browser_openExport.js b/browser/components/aboutlogins/tests/browser/browser_openExport.js
index c5df84c447..1a61510862 100644
--- a/browser/components/aboutlogins/tests/browser/browser_openExport.js
+++ b/browser/components/aboutlogins/tests/browser/browser_openExport.js
@@ -27,7 +27,7 @@ add_setup(async function () {
return !events || !events.length;
}, "Waiting for content telemetry events to get cleared");
- MockFilePicker.init(window);
+ MockFilePicker.init(window.browsingContext);
MockFilePicker.useAnyFile();
MockFilePicker.returnValue = MockFilePicker.returnOK;
diff --git a/browser/components/aboutlogins/tests/browser/browser_openImportCSV.js b/browser/components/aboutlogins/tests/browser/browser_openImportCSV.js
index 4800b8a309..0f8aa062e1 100644
--- a/browser/components/aboutlogins/tests/browser/browser_openImportCSV.js
+++ b/browser/components/aboutlogins/tests/browser/browser_openImportCSV.js
@@ -25,7 +25,7 @@ class CsvImportHelper {
*/
static waitForOpenFilePicker(destFile) {
return new Promise(resolve => {
- MockFilePicker.showCallback = fp => {
+ MockFilePicker.showCallback = _fp => {
info("showCallback");
info("fileName: " + destFile.path);
MockFilePicker.setFiles([destFile]);
@@ -48,7 +48,7 @@ class CsvImportHelper {
* @returns {Promise} A promise that is resolved when the picker selects the file.
*/
static async clickImportFromCsvMenu(browser, linesInFile) {
- MockFilePicker.init(window);
+ MockFilePicker.init(window.browsingContext);
MockFilePicker.returnValue = MockFilePicker.returnOK;
let csvFile = await LoginTestUtils.file.setupCsvFileWithLines(linesInFile);
@@ -217,11 +217,9 @@ class CsvImportHelper {
/**
* An utility method to fetch data from the about:loginsimportreport page.
*
- * @param {browser} browser
- * The browser object.
* @returns {Promise<Object>} A promise that contains the detailed report data like added, modified, noChange, errors and rows.
*/
- static async getDetailedReportData(browser) {
+ static async getDetailedReportData() {
const data = await SpecialPowers.spawn(
gBrowser.selectedBrowser,
[],
@@ -357,7 +355,7 @@ add_task(async function test_open_import_all_four_detailed_report() {
await CsvImportHelper.clickImportFromCsvMenu(browser, updatedCsvData);
await CsvImportHelper.waitForImportToComplete();
const reportTab = await CsvImportHelper.clickDetailedReport(browser);
- const report = await CsvImportHelper.getDetailedReportData(browser);
+ const report = await CsvImportHelper.getDetailedReportData();
BrowserTestUtils.removeTab(reportTab);
const { added, modified, noChange, errors, rows } = report;
Assert.equal(added, 1, "It should have one item as added");
diff --git a/browser/components/aboutlogins/tests/browser/browser_updateLogin.js b/browser/components/aboutlogins/tests/browser/browser_updateLogin.js
index c7ed2816ff..686b3951a1 100644
--- a/browser/components/aboutlogins/tests/browser/browser_updateLogin.js
+++ b/browser/components/aboutlogins/tests/browser/browser_updateLogin.js
@@ -301,74 +301,65 @@ add_task(async function test_login_item() {
});
info("waiting for oskeystore auth #4");
await reauthObserved;
- await SpecialPowers.spawn(
- browser,
- [LoginHelper.loginToVanillaObject(TEST_LOGIN1)],
- async login => {
- let loginItem = Cu.waiveXrays(
- content.document.querySelector("login-item")
- );
- await ContentTaskUtils.waitForCondition(
- () => loginItem.dataset.editing,
- "Entering edit mode"
- );
- await Promise.resolve();
-
- let revealCheckbox = loginItem.shadowRoot.querySelector(
- ".reveal-password-checkbox"
- );
- revealCheckbox.click();
- Assert.ok(
- revealCheckbox.checked,
- "reveal-checkbox should be checked after clicking"
- );
+ await SpecialPowers.spawn(browser, [], async () => {
+ let loginItem = Cu.waiveXrays(content.document.querySelector("login-item"));
+ await ContentTaskUtils.waitForCondition(
+ () => loginItem.dataset.editing,
+ "Entering edit mode"
+ );
+ await Promise.resolve();
- let usernameInput = loginItem.shadowRoot.querySelector(
- "input[name='username']"
- );
- let passwordInput = loginItem._passwordInput;
+ let revealCheckbox = loginItem.shadowRoot.querySelector(
+ ".reveal-password-checkbox"
+ );
+ revealCheckbox.click();
+ Assert.ok(
+ revealCheckbox.checked,
+ "reveal-checkbox should be checked after clicking"
+ );
- usernameInput.value += "-saveme";
- passwordInput.value += "-saveme";
+ let usernameInput = loginItem.shadowRoot.querySelector(
+ "input[name='username']"
+ );
+ let passwordInput = loginItem._passwordInput;
- Assert.ok(
- loginItem.dataset.editing,
- "LoginItem should be in 'edit' mode"
- );
+ usernameInput.value += "-saveme";
+ passwordInput.value += "-saveme";
- let saveChangesButton = loginItem.shadowRoot.querySelector(
- ".save-changes-button"
- );
- saveChangesButton.click();
+ Assert.ok(loginItem.dataset.editing, "LoginItem should be in 'edit' mode");
- await ContentTaskUtils.waitForCondition(() => {
- let loginList = Cu.waiveXrays(
- content.document.querySelector("login-list")
- );
- let guid = loginList._loginGuidsSortedOrder[0];
- let updatedLogin = loginList._logins[guid].login;
- return (
- updatedLogin &&
- updatedLogin.username == usernameInput.value &&
- updatedLogin.password == passwordInput.value
- );
- }, "Waiting for corresponding login in login list to update");
+ let saveChangesButton = loginItem.shadowRoot.querySelector(
+ ".save-changes-button"
+ );
+ saveChangesButton.click();
- Assert.ok(
- !revealCheckbox.checked,
- "reveal-checkbox should be unchecked after saving changes"
- );
- Assert.ok(
- !loginItem.dataset.editing,
- "LoginItem should not be in 'edit' mode after saving"
+ await ContentTaskUtils.waitForCondition(() => {
+ let loginList = Cu.waiveXrays(
+ content.document.querySelector("login-list")
);
- Assert.equal(
- passwordInput.style.width,
- passwordInput.value.length + "ch",
- "Password field width should be correctly updated"
+ let guid = loginList._loginGuidsSortedOrder[0];
+ let updatedLogin = loginList._logins[guid].login;
+ return (
+ updatedLogin &&
+ updatedLogin.username == usernameInput.value &&
+ updatedLogin.password == passwordInput.value
);
- }
- );
+ }, "Waiting for corresponding login in login list to update");
+
+ Assert.ok(
+ !revealCheckbox.checked,
+ "reveal-checkbox should be unchecked after saving changes"
+ );
+ Assert.ok(
+ !loginItem.dataset.editing,
+ "LoginItem should not be in 'edit' mode after saving"
+ );
+ Assert.equal(
+ passwordInput.style.width,
+ passwordInput.value.length + "ch",
+ "Password field width should be correctly updated"
+ );
+ });
reauthObserved = forceAuthTimeoutAndWaitForOSKeyStoreLogin({
loginResult: true,
});
@@ -381,51 +372,40 @@ add_task(async function test_login_item() {
});
info("waiting for oskeystore auth #5");
await reauthObserved;
- await SpecialPowers.spawn(
- browser,
- [LoginHelper.loginToVanillaObject(TEST_LOGIN1)],
- async login => {
- let loginItem = Cu.waiveXrays(
- content.document.querySelector("login-item")
- );
- await ContentTaskUtils.waitForCondition(
- () => loginItem.dataset.editing,
- "Entering edit mode"
- );
- await Promise.resolve();
+ await SpecialPowers.spawn(browser, [], async () => {
+ let loginItem = Cu.waiveXrays(content.document.querySelector("login-item"));
+ await ContentTaskUtils.waitForCondition(
+ () => loginItem.dataset.editing,
+ "Entering edit mode"
+ );
+ await Promise.resolve();
- Assert.ok(
- loginItem.dataset.editing,
- "LoginItem should be in 'edit' mode"
- );
- let deleteButton = loginItem.shadowRoot
- .querySelector("delete-button")
- .shadowRoot.querySelector("button");
- deleteButton.click();
- let confirmDeleteDialog = Cu.waiveXrays(
- content.document.querySelector("confirmation-dialog")
- );
- let confirmDeleteButton =
- confirmDeleteDialog.shadowRoot.querySelector(".confirm-button");
- confirmDeleteButton.click();
+ Assert.ok(loginItem.dataset.editing, "LoginItem should be in 'edit' mode");
+ let deleteButton = loginItem.shadowRoot
+ .querySelector("delete-button")
+ .shadowRoot.querySelector("button");
+ deleteButton.click();
+ let confirmDeleteDialog = Cu.waiveXrays(
+ content.document.querySelector("confirmation-dialog")
+ );
+ let confirmDeleteButton =
+ confirmDeleteDialog.shadowRoot.querySelector(".confirm-button");
+ confirmDeleteButton.click();
- let loginList = Cu.waiveXrays(
- content.document.querySelector("login-list")
- );
- let loginListItem = Cu.waiveXrays(
- loginList.shadowRoot.querySelector("login-list-item[data-guid]")
+ let loginList = Cu.waiveXrays(content.document.querySelector("login-list"));
+ let loginListItem = Cu.waiveXrays(
+ loginList.shadowRoot.querySelector("login-list-item[data-guid]")
+ );
+ await ContentTaskUtils.waitForCondition(() => {
+ loginListItem = loginList.shadowRoot.querySelector(
+ "login-list-item[data-guid]"
);
- await ContentTaskUtils.waitForCondition(() => {
- loginListItem = loginList.shadowRoot.querySelector(
- "login-list-item[data-guid]"
- );
- return !loginListItem;
- }, "Waiting for login to be removed from list");
+ return !loginListItem;
+ }, "Waiting for login to be removed from list");
- Assert.ok(
- !loginItem.dataset.editing,
- "LoginItem should not be in 'edit' mode after deleting"
- );
- }
- );
+ Assert.ok(
+ !loginItem.dataset.editing,
+ "LoginItem should not be in 'edit' mode after deleting"
+ );
+ });
});
diff --git a/browser/components/aboutlogins/tests/browser/browser_vulnerableLoginAddedInSecondaryWindow.js b/browser/components/aboutlogins/tests/browser/browser_vulnerableLoginAddedInSecondaryWindow.js
index 6e7dbbea14..d650b01b83 100644
--- a/browser/components/aboutlogins/tests/browser/browser_vulnerableLoginAddedInSecondaryWindow.js
+++ b/browser/components/aboutlogins/tests/browser/browser_vulnerableLoginAddedInSecondaryWindow.js
@@ -180,8 +180,7 @@ add_task(async function test_new_login_marked_vulnerable_in_both_windows() {
let vulnerableListItem;
await ContentTaskUtils.waitForCondition(() => {
let entry = Object.entries(loginList._logins).find(
- ([guid, { login, listItem }]) =>
- login.origin == originForNewVulnerableLogin
+ ([, { login }]) => login.origin == originForNewVulnerableLogin
);
vulnerableListItem = entry[1].listItem;
return !!entry;
diff --git a/browser/components/aboutlogins/tests/chrome/aboutlogins_common.js b/browser/components/aboutlogins/tests/chrome/aboutlogins_common.js
index e881b6ca22..c460df2ef7 100644
--- a/browser/components/aboutlogins/tests/chrome/aboutlogins_common.js
+++ b/browser/components/aboutlogins/tests/chrome/aboutlogins_common.js
@@ -80,7 +80,7 @@ Object.defineProperty(window, "AboutLoginsUtils", {
setFocus(element) {
return element.focus();
},
- async promptForPrimaryPassword(resolve, messageId) {
+ async promptForPrimaryPassword(resolve, _messageId) {
resolve(true);
},
doLoginsMatch(login1, login2) {
diff --git a/browser/components/aboutlogins/tests/chrome/test_login_item.html b/browser/components/aboutlogins/tests/chrome/test_login_item.html
index 5403487599..0c3c331c21 100644
--- a/browser/components/aboutlogins/tests/chrome/test_login_item.html
+++ b/browser/components/aboutlogins/tests/chrome/test_login_item.html
@@ -412,7 +412,7 @@ add_task(async function test_set_login_empty() {
ok(copyButtons.every(button => isHidden(button)), "The copy buttons should be hidden when creating a login");
let createEventDispatched = false;
- document.addEventListener("AboutLoginsCreateLogin", event => {
+ document.addEventListener("AboutLoginsCreateLogin", (_e) => {
createEventDispatched = true;
}, {once: true});
gLoginItem.shadowRoot.querySelector(".save-changes-button").click();