Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Unified Diff: chrome/browser/autofill/autofill_interactive_uitest.cc

Issue 357653003: Mark the single autofilled field when the relevant section is autofilled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use iterator to point to the element rather than index. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_interactive_uitest.cc
diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc
index 259e568ea3f061cb2c5c57c5de4d5c65770222a9..31ae763e3de5749384053d6f0a3f4efafa58785a 100644
--- a/chrome/browser/autofill/autofill_interactive_uitest.cc
+++ b/chrome/browser/autofill/autofill_interactive_uitest.cc
@@ -483,6 +483,35 @@ IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, AutofillSelectViaTab) {
ExpectFilledTestForm();
}
+// Test that a field is still autofillable after the previously autofilled
+// value is deleted.
+IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, OnDeleteValueAfterAutofill) {
+ CreateTestProfile();
+
+ // Load the test page.
+ ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(),
+ GURL(std::string(kDataURIPrefix) + kTestFormString)));
+
+ // Invoke and accept the Autofill popup and verify the form was filled.
+ FocusFirstNameField();
+ SendKeyToPageAndWait(ui::VKEY_M);
+ SendKeyToPopupAndWait(ui::VKEY_DOWN);
+ SendKeyToPopupAndWait(ui::VKEY_RETURN);
+ ExpectFilledTestForm();
+
+ // Delete the value of a filled field.
+ ASSERT_TRUE(content::ExecuteScript(
+ GetRenderViewHost(),
+ "document.getElementById('firstname').value = '';"));
+ ExpectFieldValue("firstname", "");
+
+ // Invoke and accept the Autofill popup and verify the field was filled.
+ SendKeyToPageAndWait(ui::VKEY_M);
+ SendKeyToPopupAndWait(ui::VKEY_DOWN);
+ SendKeyToPopupAndWait(ui::VKEY_RETURN);
+ ExpectFieldValue("firstname", "Milton");
+}
+
// Test that a JavaScript oninput event is fired after auto-filling a form.
IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, OnInputAfterAutofill) {
CreateTestProfile();
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698