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

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

Issue 2318533002: [Password Generation] Use signatures for form matching (Closed)
Patch Set: Rebase Created 4 years, 3 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/autofill_field_unittest.cc
diff --git a/components/autofill/core/browser/autofill_field_unittest.cc b/components/autofill/core/browser/autofill_field_unittest.cc
index aa88edc3ec652e7929acc04b0eef3cc65c9db4bf..ef4c0473f9ac43f3eabd10ac05595d3af802b627 100644
--- a/components/autofill/core/browser/autofill_field_unittest.cc
+++ b/components/autofill/core/browser/autofill_field_unittest.cc
@@ -198,29 +198,29 @@ TEST_F(AutofillFieldTest, IsEmpty) {
EXPECT_FALSE(field.IsEmpty());
}
-TEST_F(AutofillFieldTest, FieldSignature) {
+TEST_F(AutofillFieldTest, FieldSignatureAsStr) {
AutofillField field;
ASSERT_EQ(base::string16(), field.name);
ASSERT_EQ(std::string(), field.form_control_type);
// Signature is empty.
- EXPECT_EQ("2085434232", field.FieldSignature());
+ EXPECT_EQ("2085434232", field.FieldSignatureAsStr());
// Field name is set.
field.name = ASCIIToUTF16("Name");
- EXPECT_EQ("1606968241", field.FieldSignature());
+ EXPECT_EQ("1606968241", field.FieldSignatureAsStr());
// Field form control type is set.
field.form_control_type = "text";
- EXPECT_EQ("502192749", field.FieldSignature());
+ EXPECT_EQ("502192749", field.FieldSignatureAsStr());
// Heuristic type does not affect FieldSignature.
field.set_heuristic_type(NAME_FIRST);
- EXPECT_EQ("502192749", field.FieldSignature());
+ EXPECT_EQ("502192749", field.FieldSignatureAsStr());
// Server type does not affect FieldSignature.
field.set_server_type(NAME_LAST);
- EXPECT_EQ("502192749", field.FieldSignature());
+ EXPECT_EQ("502192749", field.FieldSignatureAsStr());
}
TEST_F(AutofillFieldTest, IsFieldFillable) {
« no previous file with comments | « components/autofill/core/browser/autofill_field.cc ('k') | components/autofill/core/browser/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698