diff options
Diffstat (limited to 'browser/extensions/formautofill/test/mochitest/test_basic_autocomplete_form.html')
-rw-r--r-- | browser/extensions/formautofill/test/mochitest/test_basic_autocomplete_form.html | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/browser/extensions/formautofill/test/mochitest/test_basic_autocomplete_form.html b/browser/extensions/formautofill/test/mochitest/test_basic_autocomplete_form.html index a642b2abca..b8a50c7d7c 100644 --- a/browser/extensions/formautofill/test/mochitest/test_basic_autocomplete_form.html +++ b/browser/extensions/formautofill/test/mochitest/test_basic_autocomplete_form.html @@ -81,44 +81,48 @@ add_task(async function check_menu_when_both_existed() { synthesizeKey("KEY_ArrowDown"); await expectPopup(); checkMenuEntries(MOCK_STORAGE.map(address => - JSON.stringify({ + makeAddressLabel({ primary: address.organization, secondary: FormAutofillUtils.toOneLineAddress(address["street-address"]), + status: "Also autofills address, phone" }) - )); + ), 2); await setInput("#street-address", ""); await notExpectPopup(); synthesizeKey("KEY_ArrowDown"); await expectPopup(); checkMenuEntries(MOCK_STORAGE.map(address => - JSON.stringify({ + makeAddressLabel({ primary: FormAutofillUtils.toOneLineAddress(address["street-address"]), secondary: address.organization, + status: "Also autofills organization, phone" }) - )); + ), 2); await setInput("#tel", ""); await notExpectPopup(); synthesizeKey("KEY_ArrowDown"); await expectPopup(); checkMenuEntries(MOCK_STORAGE.map(address => - JSON.stringify({ + makeAddressLabel({ primary: address.tel, secondary: FormAutofillUtils.toOneLineAddress(address["street-address"]), + status: "Also autofills address, organization" }) - )); + ), 2); await setInput("#address-line1", ""); await notExpectPopup(); synthesizeKey("KEY_ArrowDown"); await expectPopup(); checkMenuEntries(MOCK_STORAGE.map(address => - JSON.stringify({ + makeAddressLabel({ primary: FormAutofillUtils.toOneLineAddress(address["street-address"]), secondary: address.organization, + status: "Also autofills organization, phone" }) - )); + ), 2); }); // Display history search result if no matched data in addresses. @@ -152,11 +156,12 @@ add_task(async function check_fields_after_form_autofill() { synthesizeKey("KEY_ArrowDown"); await expectPopup(); checkMenuEntries(MOCK_STORAGE.map(address => - JSON.stringify({ + makeAddressLabel({ primary: address.organization, secondary: FormAutofillUtils.toOneLineAddress(address["street-address"]), + status: "Also autofills address, phone" }) - ).slice(1)); + ).slice(1), 2); synthesizeKey("KEY_ArrowDown"); await triggerAutofillAndCheckProfile(MOCK_STORAGE[1]); synthesizeKey("KEY_Escape"); @@ -180,11 +185,12 @@ add_task(async function check_form_autofill_resume() { await setInput("#tel", ""); await triggerPopupAndHoverItem("#tel", 0); checkMenuEntries(MOCK_STORAGE.map(address => - JSON.stringify({ + makeAddressLabel({ primary: address.tel, secondary: FormAutofillUtils.toOneLineAddress(address["street-address"]), + status: "Also autofills address, organization" }) - )); + ), 2); await triggerAutofillAndCheckProfile(MOCK_STORAGE[0]); }); |