summaryrefslogtreecommitdiffstats
path: root/browser/extensions/formautofill/test/mochitest/test_form_changes.html
diff options
context:
space:
mode:
Diffstat (limited to 'browser/extensions/formautofill/test/mochitest/test_form_changes.html')
-rw-r--r--browser/extensions/formautofill/test/mochitest/test_form_changes.html21
1 files changed, 15 insertions, 6 deletions
diff --git a/browser/extensions/formautofill/test/mochitest/test_form_changes.html b/browser/extensions/formautofill/test/mochitest/test_form_changes.html
index 1bfc655328..dfe91a63e1 100644
--- a/browser/extensions/formautofill/test/mochitest/test_form_changes.html
+++ b/browser/extensions/formautofill/test/mochitest/test_form_changes.html
@@ -61,8 +61,12 @@ async function checkFormChangeHappened(formId) {
await expectPopup();
synthesizeKey("KEY_ArrowDown");
checkMenuEntries(MOCK_STORAGE.map(address =>
- JSON.stringify({primary: address.tel, secondary: address.name})
- ));
+ makeAddressLabel({
+ primary: address.tel,
+ secondary: address.name,
+ status: "Also autofills name, organization"
+ })
+ ), 2);
// Click the first entry of the autocomplete popup and make sure all fields are autofilled
synthesizeKey("KEY_Enter");
@@ -76,8 +80,9 @@ async function checkFormChangeHappened(formId) {
// Click on an autofilled field would show an autocomplete popup with "clear form" entry
checkMenuEntries([
- JSON.stringify({primary: "", secondary: ""}), // Clear Autofill Form
- ], true);
+ "Clear Autofill Form", // Clear Autofill Form
+ "Manage addresses" // FormAutofill Preferemce
+ ], 0);
// This is for checking the changes of element removed and added then.
document.querySelector(`#${formId} input[name=address-level2]`).remove();
@@ -87,8 +92,12 @@ async function checkFormChangeHappened(formId) {
synthesizeKey("KEY_ArrowDown");
await expectPopup();
checkMenuEntries(MOCK_STORAGE.map(address =>
- JSON.stringify({primary: address["address-level2"], secondary: address.name})
- ));
+ makeAddressLabel({
+ primary: address["address-level2"],
+ secondary: address.name,
+ status: "Also autofills name, organization, phone"
+ })
+ ), 2);
// Make sure everything is autofilled in the end
synthesizeKey("KEY_ArrowDown");