gecko-dev/browser/extensions/formautofill/test/unit
Neil Deakin a7d450b343 Bug 1849122, set the autofill state directly on the input and select elements rather than using windowUtils and a separate hash that can be out of sync with each other, r=credential-management-reviewers,dimi
The existing autofill state is set on the form element using nsIDOMWindowUtils::AddManuallyManagedState, but a separate map #filledStateByElement within FormAutofillHandler.sys.mjs is used to keep track of which elements are filled in. However, this relies on input events that don't fire when form elements are hidden. In addition, when a page modifies the form field value directly, the preview state can be modified but the #filledStateByElement map is not.

Instead, remove the extra map, and just use the form field's autofill state directly. The form field will take responsibility for removing the preview state when its value changes.

This behaviour applies to single field input elements and select elements.

Differential Revision: https://phabricator.services.mozilla.com/D211000
2024-05-28 23:40:00 +00:00
..
head.js
head_addressComponent.js
test_activeStatus.js
test_addressComponent_city.js
test_addressComponent_country.js
test_addressComponent_email.js
test_addressComponent_name.js
test_addressComponent_organization.js
test_addressComponent_postal_code.js
test_addressComponent_state.js Bug 1873202 - fix address capture doorhanger issues with province normalization r=dimi 2024-03-22 13:36:00 +00:00
test_addressComponent_street_address.js
test_addressComponent_tel.js
test_addressDataLoader.js
test_addressRecords.js
test_autofillFormFields.js Bug 1864896: Polishing autofix of unused function arguments (credential management). r=credential-management-reviewers,dimi 2024-03-05 00:08:04 +00:00
test_clearPopulatedForm.js
test_collectFormFields.js
test_createRecords.js
test_creditCardRecords.js
test_extractLabelStrings.js
test_findLabelElements.js
test_getAdaptedProfiles.js
test_getAdaptedProfiles_locales.js
test_getCategoriesFromFieldNames.js
test_getCreditCardLogo.js
test_getFormInputDetails.js Bug 1883909 - P2. Move logic from FormAutofillContent to FormAutofillChild r=credential-management-reviewers,sgalich 2024-03-13 13:26:05 +00:00
test_getInfo.js
test_getRecords.js Bug 1885311 - [refactor] Do not pass collection name from child to parent while searching for formautofill records r=credential-management-reviewers,sgalich 2024-03-22 10:38:02 +00:00
test_isAddressAutofillAvailable.js Bug 1882587 - Check supportedRegions as well as experiment flags for address autofill. r=dimi 2024-02-29 09:16:16 +00:00
test_isCJKName.js
test_isCreditCardAutofillAvailable.js
test_isCreditCardOrAddressFieldType.js
test_known_strings.js
test_markAsAutofillField.js Bug 1883909 - P2. Move logic from FormAutofillContent to FormAutofillChild r=credential-management-reviewers,sgalich 2024-03-13 13:26:05 +00:00
test_migrateRecords.js
test_nameUtils.js
test_parseAddressFormat.js
test_parseStreetAddress.js
test_phoneNumber.js Bug 1885723 - Fix more jsm references in browser/. r=Gijs,credential-management-reviewers,omc-reviewers,aminomancer,mtigley 2024-03-19 22:08:29 +00:00
test_previewFormFields.js Bug 1849122, set the autofill state directly on the input and select elements rather than using windowUtils and a separate hash that can be out of sync with each other, r=credential-management-reviewers,dimi 2024-05-28 23:40:00 +00:00
test_profileAutocompleteResult.js Bug 1894889 - Trigger autocomplete action from the parent process r=credential-management-reviewers,geckoview-reviewers,NeilDeakin,owlish 2024-05-21 19:06:35 +00:00
test_reconcile.js
test_savedFieldNames.js
test_storage_remove.js
test_storage_syncfields.js
test_storage_tombstones.js Bug 1864896: Polishing autofix of unused function arguments (credential management). r=credential-management-reviewers,dimi 2024-03-05 00:08:04 +00:00
test_sync.js
test_sync_deprecate_address_x_name_fields.js
test_sync_deprecate_credit_card_v4.js
test_toOneLineAddress.js
test_transformFields.js
xpcshell.toml Bug 1883909 - P2. Move logic from FormAutofillContent to FormAutofillChild r=credential-management-reviewers,sgalich 2024-03-13 13:26:05 +00:00