summaryrefslogtreecommitdiffstats
path: root/browser/extensions/formautofill/test/mochitest/creditCard/test_clear_form.html
diff options
context:
space:
mode:
Diffstat (limited to 'browser/extensions/formautofill/test/mochitest/creditCard/test_clear_form.html')
-rw-r--r--browser/extensions/formautofill/test/mochitest/creditCard/test_clear_form.html12
1 files changed, 11 insertions, 1 deletions
diff --git a/browser/extensions/formautofill/test/mochitest/creditCard/test_clear_form.html b/browser/extensions/formautofill/test/mochitest/creditCard/test_clear_form.html
index a1a3322c4e..4803151aae 100644
--- a/browser/extensions/formautofill/test/mochitest/creditCard/test_clear_form.html
+++ b/browser/extensions/formautofill/test/mochitest/creditCard/test_clear_form.html
@@ -124,6 +124,11 @@ add_task(async function simple_clear() {
await triggerPopupAndHoverItem("#tel", 0);
await confirmClear("#tel");
await checkIsFormCleared();
+
+ // Ensure the correctness of the autocomplete popup after the form is cleared
+ synthesizeKey("KEY_ArrowDown");
+ await expectPopup();
+ is(4, getMenuEntries().length, `Checking length of expected menu`);
});
add_task(async function clear_adapted_record() {
@@ -154,7 +159,10 @@ add_task(async function clear_distinct_section() {
document.getElementById("form1").reset();
await triggerPopupAndHoverItem("#cc-name", 0);
- let osKeyStoreLoginShown = waitForOSKeyStoreLogin(true);
+ let osKeyStoreLoginShown = Promise.resolve();
+ if(OSKeyStore.canReauth()) {
+ osKeyStoreLoginShown = waitForOSKeyStoreLogin(true);
+ }
await triggerAutofillAndCheckProfile(MOCK_CC_STORAGE_EXPECTED_FILL[0]);
await osKeyStoreLoginShown;
@@ -175,6 +183,8 @@ add_task(async function clear_distinct_section() {
await triggerPopupAndHoverItem("#cc-name", 0);
await confirmClear("#cc-name");
await checkIsFormCleared();
+ // Enforcing this since it is unable to change back in chaos mode.
+ SpecialPowers.clearUserPref("toolkit.osKeyStore.unofficialBuildOnlyLogin");
});
</script>