From da4c7e7ed675c3bf405668739c3012d140856109 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:42 +0200 Subject: Adding upstream version 126.0. Signed-off-by: Daniel Baumann --- .../passwordmgr/LoginAutoComplete.sys.mjs | 48 ++++------------------ .../passwordmgr/LoginManagerAuthPrompter.sys.mjs | 9 +--- .../passwordmgr/LoginManagerChild.sys.mjs | 10 +---- .../passwordmgr/nsILoginAutoCompleteSearch.idl | 4 +- .../passwordmgr/test/LoginTestUtils.sys.mjs | 7 ++++ .../test/browser/browser_basicAuth_multiTab.js | 7 ---- .../test/browser/browser_basicAuth_rateLimit.js | 4 +- .../test/browser/browser_basicAuth_switchTab.js | 6 +-- .../browser_doorhanger_form_password_edit.js | 20 ++++----- .../browser_doorhanger_generated_password.js | 28 ++++++------- .../test/browser/browser_entry_point_telemetry.js | 2 +- .../test/browser/browser_private_window.js | 4 +- .../test/browser/browser_proxyAuth_prompt.js | 4 -- .../passwordmgr/test/mochitest/pwmgr_common.js | 24 ++++++++--- .../test_formless_submit_form_removal.html | 2 +- .../test/mochitest/test_prompt_async.html | 4 +- .../test/mochitest/test_prompt_http.html | 4 +- .../test/mochitest/test_prompt_noWindow.html | 4 +- .../test/mochitest/test_prompt_promptAuth.html | 4 +- .../mochitest/test_prompt_promptAuth_proxy.html | 4 +- .../passwordmgr/test/mochitest/test_xhr.html | 15 +------ .../test_PasswordRulesManager_generatePassword.js | 2 +- 22 files changed, 80 insertions(+), 136 deletions(-) (limited to 'toolkit/components/passwordmgr') diff --git a/toolkit/components/passwordmgr/LoginAutoComplete.sys.mjs b/toolkit/components/passwordmgr/LoginAutoComplete.sys.mjs index 411d9249db..187caf9d62 100644 --- a/toolkit/components/passwordmgr/LoginAutoComplete.sys.mjs +++ b/toolkit/components/passwordmgr/LoginAutoComplete.sys.mjs @@ -7,7 +7,10 @@ */ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; -import { GenericAutocompleteItem } from "resource://gre/modules/FillHelpers.sys.mjs"; +import { + GenericAutocompleteItem, + sendFillRequestToParent, +} from "resource://gre/modules/FillHelpers.sys.mjs"; const lazy = {}; @@ -487,7 +490,7 @@ export class LoginAutoComplete { * @param {string} aSearchString The value typed in the field. * @param {nsIAutoCompleteResult} aPreviousResult * @param {HTMLInputElement} aElement - * @param {nsIFormAutoCompleteObserver} aCallback + * @param {nsIFormFillCompleteObserver} aCallback */ startSearch(aSearchString, aPreviousResult, aElement, aCallback) { let { isNullPrincipal } = aElement.nodePrincipal; @@ -717,7 +720,6 @@ export class LoginAutoComplete { let gAutoCompleteListener = { added: false, - fillRequestId: 0, init() { if (!this.added) { @@ -729,45 +731,11 @@ let gAutoCompleteListener = { async observe(subject, topic, data) { switch (topic) { case "autocomplete-will-enter-text": { - await this.sendFillRequestToLoginManagerParent(subject, data); + if (subject && subject == lazy.formFillController.controller.input) { + await sendFillRequestToParent("LoginManager", subject, data); + } break; } } }, - - async sendFillRequestToLoginManagerParent(input, comment) { - if (!comment) { - return; - } - - if (input != lazy.formFillController.controller.input) { - return; - } - - const { fillMessageName, fillMessageData } = JSON.parse(comment ?? "{}"); - if (!fillMessageName) { - return; - } - - this.fillRequestId++; - const fillRequestId = this.fillRequestId; - const child = lazy.LoginManagerChild.forWindow( - input.focusedInput.ownerGlobal - ); - const value = await child.sendQuery(fillMessageName, fillMessageData ?? {}); - - // skip fill if another fill operation started during await - if (fillRequestId != this.fillRequestId) { - return; - } - - if (typeof value !== "string") { - return; - } - - // If LoginManagerParent returned a string to fill, we must do it here because - // nsAutoCompleteController.cpp already finished it's work before we finished await. - input.textValue = value; - input.selectTextRange(value.length, value.length); - }, }; diff --git a/toolkit/components/passwordmgr/LoginManagerAuthPrompter.sys.mjs b/toolkit/components/passwordmgr/LoginManagerAuthPrompter.sys.mjs index f56ec80d5e..8cc501b79d 100644 --- a/toolkit/components/passwordmgr/LoginManagerAuthPrompter.sys.mjs +++ b/toolkit/components/passwordmgr/LoginManagerAuthPrompter.sys.mjs @@ -711,7 +711,7 @@ LoginManagerAuthPrompter.prototype = { ok = await Services.prompt.asyncPromptAuth( this._browser?.browsingContext, - LoginManagerAuthPrompter.promptAuthModalType, + Ci.nsIPrompt.MODAL_TYPE_TAB, aChannel, aLevel, aAuthInfo @@ -1115,10 +1115,3 @@ ChromeUtils.defineLazyGetter(LoginManagerAuthPrompter.prototype, "log", () => { let logger = lazy.LoginHelper.createLogger("LoginManagerAuthPrompter"); return logger.log.bind(logger); }); - -XPCOMUtils.defineLazyPreferenceGetter( - LoginManagerAuthPrompter, - "promptAuthModalType", - "prompts.modalType.httpAuth", - Services.prompt.MODAL_TYPE_WINDOW -); diff --git a/toolkit/components/passwordmgr/LoginManagerChild.sys.mjs b/toolkit/components/passwordmgr/LoginManagerChild.sys.mjs index c89852b56c..66f45416f8 100644 --- a/toolkit/components/passwordmgr/LoginManagerChild.sys.mjs +++ b/toolkit/components/passwordmgr/LoginManagerChild.sys.mjs @@ -2435,15 +2435,7 @@ export class LoginManagerChild extends JSWindowActorChild { if (isSubmission) { // Notify `PasswordManager:onFormSubmit` as long as we detect submission event on a // valid form with a password field. - this.sendAsyncMessage( - "PasswordManager:onFormSubmit", - {}, - { - fields, - isSubmission, - triggeredByFillingGenerated, - } - ); + this.sendAsyncMessage("PasswordManager:onFormSubmit", {}); } } diff --git a/toolkit/components/passwordmgr/nsILoginAutoCompleteSearch.idl b/toolkit/components/passwordmgr/nsILoginAutoCompleteSearch.idl index 6c0e94b445..586292d04d 100644 --- a/toolkit/components/passwordmgr/nsILoginAutoCompleteSearch.idl +++ b/toolkit/components/passwordmgr/nsILoginAutoCompleteSearch.idl @@ -5,7 +5,7 @@ #include "nsISupports.idl" interface nsIAutoCompleteResult; -interface nsIFormAutoCompleteObserver; +interface nsIFormFillCompleteObserver; webidl HTMLInputElement; @@ -22,7 +22,7 @@ interface nsILoginAutoCompleteSearch : nsISupports { void startSearch(in AString aSearchString, in nsIAutoCompleteResult aPreviousResult, in HTMLInputElement aElement, - in nsIFormAutoCompleteObserver aListener); + in nsIFormFillCompleteObserver aListener); /** * Stop a previously-started search. diff --git a/toolkit/components/passwordmgr/test/LoginTestUtils.sys.mjs b/toolkit/components/passwordmgr/test/LoginTestUtils.sys.mjs index 94e48aac6a..c16a44735e 100644 --- a/toolkit/components/passwordmgr/test/LoginTestUtils.sys.mjs +++ b/toolkit/components/passwordmgr/test/LoginTestUtils.sys.mjs @@ -67,6 +67,13 @@ export const LoginTestUtils = { return Services.logins.addLoginAsync(login); }, + /** + * Removes a login from the store + */ + async removeLogin(login) { + return Services.logins.removeLogin(login); + }, + async modifyLogin(oldLogin, newLogin) { const storageChangedPromise = TestUtils.topicObserved( "passwordmgr-storage-changed", diff --git a/toolkit/components/passwordmgr/test/browser/browser_basicAuth_multiTab.js b/toolkit/components/passwordmgr/test/browser/browser_basicAuth_multiTab.js index 0069c653a5..2115272abe 100644 --- a/toolkit/components/passwordmgr/test/browser/browser_basicAuth_multiTab.js +++ b/toolkit/components/passwordmgr/test/browser/browser_basicAuth_multiTab.js @@ -88,13 +88,6 @@ async function testTabAuthed(expectAuthed, { tab, loadPromise, authOptions }) { ); } -add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - // This test relies on tab auth prompts. - set: [["prompts.modalType.httpAuth", Services.prompt.MODAL_TYPE_TAB]], - }); -}); - add_task(async function test() { let tabA = await openTabWithAuthPrompt(ORIGIN1, { user: "userA", diff --git a/toolkit/components/passwordmgr/test/browser/browser_basicAuth_rateLimit.js b/toolkit/components/passwordmgr/test/browser/browser_basicAuth_rateLimit.js index b0a5b8b335..214ae5d299 100644 --- a/toolkit/components/passwordmgr/test/browser/browser_basicAuth_rateLimit.js +++ b/toolkit/components/passwordmgr/test/browser/browser_basicAuth_rateLimit.js @@ -5,12 +5,10 @@ // This tests that the basic auth dialog can not be used for DOS attacks // and that the protections are reset on user-initiated navigation/reload. -let promptModalType = Services.prefs.getIntPref("prompts.modalType.httpAuth"); - function promiseAuthWindowShown() { return PromptTestUtils.handleNextPrompt( window, - { modalType: promptModalType, promptType: "promptUserAndPass" }, + { modalType: Ci.nsIPrompt.MODAL_TYPE_TAB, promptType: "promptUserAndPass" }, { buttonNumClick: 1 } ); } diff --git a/toolkit/components/passwordmgr/test/browser/browser_basicAuth_switchTab.js b/toolkit/components/passwordmgr/test/browser/browser_basicAuth_switchTab.js index 8fddea4c93..8e993388e7 100644 --- a/toolkit/components/passwordmgr/test/browser/browser_basicAuth_switchTab.js +++ b/toolkit/components/passwordmgr/test/browser/browser_basicAuth_switchTab.js @@ -2,14 +2,12 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -let modalType = Services.prefs.getIntPref("prompts.modalType.httpAuth"); - -add_task(async function test() { +add_task(async function test_auth_switchtab() { let tab = BrowserTestUtils.addTab(gBrowser); isnot(tab, gBrowser.selectedTab, "New tab shouldn't be selected"); let authPromptShown = PromptTestUtils.waitForPrompt(tab.linkedBrowser, { - modalType, + modalType: Ci.nsIPrompt.MODAL_TYPE_TAB, promptType: "promptUserAndPass", }); diff --git a/toolkit/components/passwordmgr/test/browser/browser_doorhanger_form_password_edit.js b/toolkit/components/passwordmgr/test/browser/browser_doorhanger_form_password_edit.js index 23afd2c6ab..ad91270eb5 100644 --- a/toolkit/components/passwordmgr/test/browser/browser_doorhanger_form_password_edit.js +++ b/toolkit/components/passwordmgr/test/browser/browser_doorhanger_form_password_edit.js @@ -30,7 +30,7 @@ let testCases = [ doorhanger: { type: "password-save", dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, username: "", password: "abcXYZ", toggle: "visible", @@ -56,7 +56,7 @@ let testCases = [ doorhanger: { type: "password-save", dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, username: "", password: "pass-changed", toggle: "visible", @@ -80,7 +80,7 @@ let testCases = [ doorhanger: { type: "password-change", dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, username: "user1", password: "autopass-changed", }, @@ -104,7 +104,7 @@ let testCases = [ doorhanger: { type: "password-save", dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, username: "user2", password: "pass2", toggle: "visible", @@ -147,7 +147,7 @@ let testCases = [ doorhanger: { type: "password-save", dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, username: "user2", password: "pass1", toggle: "visible", @@ -174,7 +174,7 @@ let testCases = [ doorhanger: { type: "password-change", dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, username: "user-saved", password: "pass2", toggle: "visible", @@ -198,7 +198,7 @@ let testCases = [ doorhanger: { type: "password-change", dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, username: "user1", password: "pass1", toggle: "visible", @@ -244,7 +244,7 @@ let testCases = [ doorhanger: { type: "password-save", dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, username: "", password: "a", toggle: "visible", @@ -271,7 +271,7 @@ let testCases = [ doorhanger: { type: "password-save", dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, username: "", password: "abc", toggle: "visible", @@ -296,7 +296,7 @@ let testCases = [ doorhanger: { type: "password-change", dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, username: "", password: "pass", toggle: "visible", diff --git a/toolkit/components/passwordmgr/test/browser/browser_doorhanger_generated_password.js b/toolkit/components/passwordmgr/test/browser/browser_doorhanger_generated_password.js index 798337ddda..dd3a1a216e 100644 --- a/toolkit/components/passwordmgr/test/browser/browser_doorhanger_generated_password.js +++ b/toolkit/components/passwordmgr/test/browser/browser_doorhanger_generated_password.js @@ -481,7 +481,7 @@ add_task(async function autocomplete_generated_password_saved_empty_username() { info("Waiting to openAndVerifyDoorhanger"); await openAndVerifyDoorhanger(browser, "password-change", { dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: "", passwordLength: LoginTestUtils.generation.LENGTH, }); @@ -493,7 +493,7 @@ add_task(async function autocomplete_generated_password_saved_empty_username() { await submitForm(browser); let notif = await openAndVerifyDoorhanger(browser, "password-change", { dismissed: false, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: "", passwordLength: LoginTestUtils.generation.LENGTH, }); @@ -648,7 +648,7 @@ add_task(async function ac_gen_pw_saved_empty_un_stored_non_empty_un_in_form() { info("Waiting to openAndVerifyDoorhanger"); await openAndVerifyDoorhanger(browser, "password-save", { dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: "myusername", passwordLength: LoginTestUtils.generation.LENGTH, }); @@ -660,7 +660,7 @@ add_task(async function ac_gen_pw_saved_empty_un_stored_non_empty_un_in_form() { await submitForm(browser); let notif = await openAndVerifyDoorhanger(browser, "password-save", { dismissed: false, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: "myusername", passwordLength: LoginTestUtils.generation.LENGTH, }); @@ -719,7 +719,7 @@ add_task(async function contextfill_generated_password_saved_empty_username() { info("Waiting to openAndVerifyDoorhanger"); await openAndVerifyDoorhanger(browser, "password-change", { dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: "", passwordLength: LoginTestUtils.generation.LENGTH, }); @@ -731,7 +731,7 @@ add_task(async function contextfill_generated_password_saved_empty_username() { await submitForm(browser); let notif = await openAndVerifyDoorhanger(browser, "password-change", { dismissed: false, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: "", passwordLength: LoginTestUtils.generation.LENGTH, }); @@ -789,7 +789,7 @@ async function autocomplete_generated_password_edited_no_auto_save( info("Waiting to openAndVerifyDoorhanger"); let notif = await openAndVerifyDoorhanger(browser, "password-change", { dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: "", passwordLength: LoginTestUtils.generation.LENGTH, }); @@ -812,7 +812,7 @@ async function autocomplete_generated_password_edited_no_auto_save( info("Waiting to openAndVerifyDoorhanger"); notif = await openAndVerifyDoorhanger(browser, "password-change", { dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: "", passwordLength: LoginTestUtils.generation.LENGTH + 2, }); @@ -836,7 +836,7 @@ async function autocomplete_generated_password_edited_no_auto_save( await submitForm(browser); notif = await openAndVerifyDoorhanger(browser, "password-change", { dismissed: false, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: "", passwordLength: LoginTestUtils.generation.LENGTH + 2, }); @@ -957,7 +957,7 @@ add_task(async function contextmenu_fill_generated_password_and_set_username() { await submitForm(browser); let notif = await openAndVerifyDoorhanger(browser, "password-change", { dismissed: false, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: "differentuser", passwordLength: LoginTestUtils.generation.LENGTH, }); @@ -1386,7 +1386,7 @@ add_task(async function autosaved_login_updated_to_existing_login_onsubmit() { await waitForDoorhanger(browser, "password-change"); notif = await openAndVerifyDoorhanger(browser, "password-change", { dismissed: false, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: "user1", password: autoSavedLogin.password, }); @@ -1611,7 +1611,7 @@ add_task(async function form_change_from_autosaved_login_to_existing_login() { // the previous doorhanger would have old values, verify it was updated/replaced with new values from the form notif = await openAndVerifyDoorhanger(browser, "password-change", { dismissed: true, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: user1LoginSnapshot.username, passwordLength: user1LoginSnapshot.password.length, }); @@ -1818,7 +1818,7 @@ add_task(async function form_edit_username_and_password_of_generated_login() { info("Verifying the doorhanger"); notif = await openAndVerifyDoorhanger(browser, "password-change", { dismissed: true, - anchorExtraAttr: expectedConfirmation ? "attention" : "", + anchorExtraAttr: expectedConfirmation ? "attention" : null, usernameValue: expectedDoorhangerUsername, passwordLength: expectedDoorhangerPassword.length, }); @@ -1835,7 +1835,7 @@ add_task(async function form_edit_username_and_password_of_generated_login() { await passwordChangeDoorhangerPromise; notif = await openAndVerifyDoorhanger(browser, "password-change", { dismissed: false, - anchorExtraAttr: "", + anchorExtraAttr: null, usernameValue: "someuser", passwordLength: LoginTestUtils.generation.LENGTH + 2, }); diff --git a/toolkit/components/passwordmgr/test/browser/browser_entry_point_telemetry.js b/toolkit/components/passwordmgr/test/browser/browser_entry_point_telemetry.js index 9241f18612..2fbca0381b 100644 --- a/toolkit/components/passwordmgr/test/browser/browser_entry_point_telemetry.js +++ b/toolkit/components/passwordmgr/test/browser/browser_entry_point_telemetry.js @@ -68,7 +68,7 @@ add_task(async function pageInfo_entryPoint() { }, async function (_browser) { info("pageInfo_entryPoint, opening pageinfo"); - let pageInfo = BrowserPageInfo(TEST_ORIGIN, "securityTab", {}); + let pageInfo = BrowserCommands.pageInfo(TEST_ORIGIN, "securityTab", {}); await BrowserTestUtils.waitForEvent(pageInfo, "page-info-init"); info( "pageInfo_entryPoint, got pageinfo, wait until password button is visible" diff --git a/toolkit/components/passwordmgr/test/browser/browser_private_window.js b/toolkit/components/passwordmgr/test/browser/browser_private_window.js index 31fe82cf8b..8e1e22c20f 100644 --- a/toolkit/components/passwordmgr/test/browser/browser_private_window.js +++ b/toolkit/components/passwordmgr/test/browser/browser_private_window.js @@ -77,7 +77,7 @@ async function loadAccessRestrictedURL(browser, url, username, password) { // Wait for the auth prompt, enter the login details and close the prompt await PromptTestUtils.handleNextPrompt( browser, - { modalType: authPromptModalType, promptType: "promptUserAndPass" }, + { modalType: Ci.nsIPrompt.MODAL_TYPE_TAB, promptType: "promptUserAndPass" }, { buttonNumClick: 0, loginInput: username, passwordInput: password } ); @@ -106,13 +106,11 @@ const authUrl = `https://example.com/${DIRECTORY_PATH}authenticate.sjs`; let normalWin; let privateWin; -let authPromptModalType; // XXX: Note that tasks are currently run in sequence. Some tests may assume the state // resulting from successful or unsuccessful logins in previous tasks add_task(async function test_setup() { - authPromptModalType = Services.prefs.getIntPref("prompts.modalType.httpAuth"); normalWin = await BrowserTestUtils.openNewBrowserWindow({ private: false }); privateWin = await BrowserTestUtils.openNewBrowserWindow({ private: true }); Services.logins.removeAllUserFacingLogins(); diff --git a/toolkit/components/passwordmgr/test/browser/browser_proxyAuth_prompt.js b/toolkit/components/passwordmgr/test/browser/browser_proxyAuth_prompt.js index dfa78ff28e..6dfe7d4021 100644 --- a/toolkit/components/passwordmgr/test/browser/browser_proxyAuth_prompt.js +++ b/toolkit/components/passwordmgr/test/browser/browser_proxyAuth_prompt.js @@ -60,10 +60,6 @@ function initProxy() { } add_setup(async function () { - await SpecialPowers.pushPrefEnv({ - // This test relies on tab auth prompts. - set: [["prompts.modalType.httpAuth", Services.prompt.MODAL_TYPE_TAB]], - }); proxyChannel = await initProxy(); }); diff --git a/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js b/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js index 1494c60bbd..1e02e6a368 100644 --- a/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js +++ b/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js @@ -25,11 +25,6 @@ const { LENGTH: GENERATED_PASSWORD_LENGTH, REGEX: GENERATED_PASSWORD_REGEX } = const LOGIN_FIELD_UTILS = LoginTestUtils.loginField; const TESTS_DIR = "/tests/toolkit/components/passwordmgr/test/"; -// Depending on pref state we either show auth prompts as windows or on tab level. -let authPromptModalType = SpecialPowers.Services.prefs.getIntPref( - "prompts.modalType.httpAuth" -); - /** * Recreate a DOM tree using the outerHTML to ensure that any event listeners * and internal state for the elements are removed. @@ -1051,6 +1046,23 @@ SimpleTest.registerCleanupFunction(() => { }); }); +// This is a version of LoginHelper.loginToVanillaObject that is adapted to run +// as content JS instead of chrome JS. This is needed to make it return a +// content JS object because the structured cloning we use to send it over +// JS IPC can't deal with a cross compartment wrapper. +function loginToVanillaObject(login) { + let obj = {}; + for (let i in SpecialPowers.do_QueryInterface( + login, + SpecialPowers.Ci.nsILoginMetaInfo + )) { + if (typeof login[i] !== "function") { + obj[i] = login[i]; + } + } + return obj; +} + /** * Proxy for Services.logins (nsILoginManager). * Only supports arguments which support structured clone plus {nsILoginInfo} @@ -1067,7 +1079,7 @@ this.LoginManager = new Proxy( SpecialPowers.call_Instanceof(val, SpecialPowers.Ci.nsILoginInfo) ) { loginInfoIndices.push(index); - return LoginHelper.loginToVanillaObject(val); + return loginToVanillaObject(val); } return val; diff --git a/toolkit/components/passwordmgr/test/mochitest/test_formless_submit_form_removal.html b/toolkit/components/passwordmgr/test/mochitest/test_formless_submit_form_removal.html index b2ff2d8845..83e2f1d3c6 100644 --- a/toolkit/components/passwordmgr/test/mochitest/test_formless_submit_form_removal.html +++ b/toolkit/components/passwordmgr/test/mochitest/test_formless_submit_form_removal.html @@ -161,7 +161,7 @@ const TESTCASES = [ }, /* XXX - Bug 1698498 : - This test case fails because when we call querySelector in LoginRecipes.jsm + This test case fails because when we call querySelector in LoginRecipes.sys.mjs after the form is removed, querySelector can't find the element. { document: ` diff --git a/toolkit/components/passwordmgr/test/mochitest/test_prompt_async.html b/toolkit/components/passwordmgr/test/mochitest/test_prompt_async.html index 1edbf8cf18..84f8c4aafb 100644 --- a/toolkit/components/passwordmgr/test/mochitest/test_prompt_async.html +++ b/toolkit/components/passwordmgr/test/mochitest/test_prompt_async.html @@ -20,8 +20,8 @@ const EXAMPLE_ORG = "http://example.org/tests/toolkit/components/passwordmgr/test/mochitest/"; let mozproxyOrigin; - // Let prompt_common know what kind of modal type is enabled for auth prompts. - modalType = authPromptModalType; + // Let prompt_common know what kind of modal type is used for auth prompts. + modalType = Ci.nsIPrompt.MODAL_TYPE_TAB; // These are magically defined on the window due to the iframe IDs /* global iframe1, iframe2a, iframe2b */ diff --git a/toolkit/components/passwordmgr/test/mochitest/test_prompt_http.html b/toolkit/components/passwordmgr/test/mochitest/test_prompt_http.html index f6f6e681dc..f008950c2b 100644 --- a/toolkit/components/passwordmgr/test/mochitest/test_prompt_http.html +++ b/toolkit/components/passwordmgr/test/mochitest/test_prompt_http.html @@ -19,8 +19,8 @@