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

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

Issue 22040002: [Autofill] Add a separate enumeration for HTML field type hints. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser test Created 7 years, 4 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 c47f314861464fb7a2a4b62969835948602a38ba..3c26302378382ce385ea27c0f09e44e798dff0b6 100644
--- a/components/autofill/core/browser/autofill_field_unittest.cc
+++ b/components/autofill/core/browser/autofill_field_unittest.cc
@@ -18,19 +18,22 @@ TEST(AutofillFieldTest, Type) {
ASSERT_EQ(UNKNOWN_TYPE, field.heuristic_type());
// |server_type_| is NO_SERVER_DATA, so |heuristic_type_| is returned.
- EXPECT_EQ(UNKNOWN_TYPE, field.Type().server_type());
+ EXPECT_EQ(UNKNOWN_TYPE, field.Type().GetStorableType());
// Set the heuristic type and check it.
field.set_heuristic_type(NAME_FIRST);
- EXPECT_EQ(NAME_FIRST, field.Type().server_type());
+ EXPECT_EQ(NAME_FIRST, field.Type().GetStorableType());
+ EXPECT_EQ(NAME, field.Type().group());
// Set the server type and check it.
field.set_server_type(ADDRESS_BILLING_LINE1);
- EXPECT_EQ(ADDRESS_BILLING_LINE1, field.Type().server_type());
+ EXPECT_EQ(ADDRESS_HOME_LINE1, field.Type().GetStorableType());
+ EXPECT_EQ(ADDRESS_BILLING, field.Type().group());
// Remove the server type to make sure the heuristic type is preserved.
field.set_server_type(NO_SERVER_DATA);
- EXPECT_EQ(NAME_FIRST, field.Type().server_type());
+ EXPECT_EQ(NAME_FIRST, field.Type().GetStorableType());
+ EXPECT_EQ(NAME, field.Type().group());
}
TEST(AutofillFieldTest, IsEmpty) {
@@ -72,7 +75,7 @@ TEST(AutofillFieldTest, FieldSignature) {
TEST(AutofillFieldTest, IsFieldFillable) {
AutofillField field;
- ASSERT_EQ(UNKNOWN_TYPE, field.Type().server_type());
+ ASSERT_EQ(UNKNOWN_TYPE, field.Type().GetStorableType());
// Type is unknown.
EXPECT_FALSE(field.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