/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; const { FormAutofillChild } = ChromeUtils.importESModule( "resource://autofill/FormAutofillChild.ios.sys.mjs" ); const { AutofillTelemetry } = ChromeUtils.importESModule( "resource://gre/modules/shared/AutofillTelemetry.sys.mjs" ); var { FormAutofillHandler } = ChromeUtils.importESModule( "resource://gre/modules/shared/FormAutofillHandler.sys.mjs" ); const TEST_CASES = [ { description: `basic credit card form`, document: `
`, fillPayload: { "cc-number": "4111111111111111", "cc-name": "test name", "cc-exp-month": 6, "cc-exp-year": 25, }, expectedDetectedFields: { "cc-number": "", "cc-name": "", "cc-exp-month": "", "cc-exp-year": "", "cc-type": "", }, expectedFill: { "#cc-number": "4111111111111111", "#cc-name": "test name", "#cc-exp-month": 6, "#cc-exp-year": 25, }, expectedSubmit: [ { "cc-number": "4111111111111111", "cc-name": "test name", "cc-exp-month": 6, "cc-exp-year": 2025, "cc-type": "visa", }, ], }, { description: `basic address form`, document: `