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

Unified Diff: chrome/renderer/autofill/form_autofill_browsertest.cc

Issue 1670763006: Autofill server-side heuristics for 2 fields password form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 10 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/content/renderer/form_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/form_autofill_browsertest.cc
diff --git a/chrome/renderer/autofill/form_autofill_browsertest.cc b/chrome/renderer/autofill/form_autofill_browsertest.cc
index 90238e68e9cd4d797c427eb048a75bef7d275383..6fc2d445e45a452847f17031cd760ede043fd74a 100644
--- a/chrome/renderer/autofill/form_autofill_browsertest.cc
+++ b/chrome/renderer/autofill/form_autofill_browsertest.cc
@@ -4477,6 +4477,17 @@ TEST_F(FormAutofillTest, FormCache_ExtractNewForms) {
{"<INPUT type='text' id='firstname'/>"
"<INPUT type='submit' value='Send'/>",
false, false, false},
+ // A form with one field which is password should not be extracted.
+ {"<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='password' id='pw'/>"
+ "</FORM>",
+ false, true, false},
+ // A form with two fields which are passwords should be extracted.
+ {"<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='password' id='pw'/>"
+ " <INPUT type='password' id='new_pw'/>"
+ "</FORM>",
+ true, true, false},
};
for (auto test_case : test_cases) {
« no previous file with comments | « no previous file | components/autofill/content/renderer/form_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698