/** * Test for LoginFormState.getUserNameAndPasswordFields */ "use strict"; const { LoginManagerChild } = ChromeUtils.import( "resource://gre/modules/LoginManagerChild.jsm" ); const TESTCASES = [ { description: "1 password field outside of a
`, returnedFieldIDs: [null, null, null], }, { description: "1 text field outside of a `, returnedFieldIDs: ["un1", "pw1", null], }, { description: "5 empty password fields outside of a `, returnedFieldIDs: [null, "pw1", null], }, { description: "Form with 2 password fields", document: ``, returnedFieldIDs: [null, "pw1", null], }, { description: "1 password field in a form, 1 outside (not processed)", document: ``, returnedFieldIDs: [null, "pw1", null], }, { description: "1 password field in a form, 1 text field outside (not processed)", document: ``, returnedFieldIDs: [null, "pw1", null], }, { description: "1 text field in a form, 1 password field outside (not processed)", document: ``, returnedFieldIDs: [null, null, null], }, { description: "2 password fields outside of a `, returnedFieldIDs: [null, "pw1", null], }, { description: "1 username field in a `, returnedFieldIDs: ["un1", null, null], }, { description: "1 username field outside of a