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

Unified Diff: components/autofill/core/browser/form_structure_unittest.cc

Issue 2796873002: Sending autofill types for username fields in sign-in forms for improving username detection. (Closed)
Patch Set: Fix compilation error Created 3 years, 8 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
Index: components/autofill/core/browser/form_structure_unittest.cc
diff --git a/components/autofill/core/browser/form_structure_unittest.cc b/components/autofill/core/browser/form_structure_unittest.cc
index 17fb018e8dad3e3a9acbd4ad81e682cf14c56c0e..ac8097176687ccf0a74928dd7de77346e7d16cde 100644
--- a/components/autofill/core/browser/form_structure_unittest.cc
+++ b/components/autofill/core/browser/form_structure_unittest.cc
@@ -334,6 +334,19 @@ TEST_F(FormStructureTest, ShouldBeParsed) {
form.fields.push_back(field);
form_structure.reset(new FormStructure(form));
EXPECT_TRUE(form_structure->ShouldBeParsed());
+
+ // There are 2 fields, one of which is password, and this is an upload of
+ // a sign-in form submission, should be parsed.
+ form.fields.clear();
+ field.name = ASCIIToUTF16("username");
+ field.form_control_type = "text";
+ form.fields.push_back(field);
+ field.name = ASCIIToUTF16("pw");
+ field.form_control_type = "password";
+ form.fields.push_back(field);
+ form_structure.reset(new FormStructure(form));
+ form_structure->set_is_signin_upload(true);
+ EXPECT_TRUE(form_structure->ShouldBeParsed());
}
// Tests that ShouldBeParsed returns true for a form containing less than three
« no previous file with comments | « components/autofill/core/browser/form_structure.cc ('k') | components/password_manager/core/browser/password_form_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698