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

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

Issue 8169009: Remove FieldTypeSubGroups from the AutofillType class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests compile Created 9 years, 2 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 | « chrome/browser/autofill/autofill_type.cc ('k') | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_type_unittest.cc
diff --git a/chrome/browser/autofill/autofill_type_unittest.cc b/chrome/browser/autofill/autofill_type_unittest.cc
index 4f5d4012123ff3485efc29a7fbf7458a20f96dd7..f680cb05cf7b36682b13f508871fc74691f32bb5 100644
--- a/chrome/browser/autofill/autofill_type_unittest.cc
+++ b/chrome/browser/autofill/autofill_type_unittest.cc
@@ -7,54 +7,46 @@
namespace {
-TEST(AutofillTypeTest, Basic) {
+TEST(AutofillTypeTest, AutofillTypes) {
// No server data.
AutofillType none(NO_SERVER_DATA);
EXPECT_EQ(NO_SERVER_DATA, none.field_type());
EXPECT_EQ(AutofillType::NO_GROUP, none.group());
- EXPECT_EQ(AutofillType::NO_SUBGROUP, none.subgroup());
// Unknown type.
AutofillType unknown(UNKNOWN_TYPE);
EXPECT_EQ(UNKNOWN_TYPE, unknown.field_type());
EXPECT_EQ(AutofillType::NO_GROUP, unknown.group());
- EXPECT_EQ(AutofillType::NO_SUBGROUP, unknown.subgroup());
// Type with group but no subgroup.
AutofillType first(NAME_FIRST);
EXPECT_EQ(NAME_FIRST, first.field_type());
EXPECT_EQ(AutofillType::NAME, first.group());
- EXPECT_EQ(AutofillType::NO_SUBGROUP, first.subgroup());
// Type with group and subgroup.
AutofillType phone(PHONE_HOME_NUMBER);
EXPECT_EQ(PHONE_HOME_NUMBER, phone.field_type());
- EXPECT_EQ(AutofillType::PHONE_HOME, phone.group());
- EXPECT_EQ(AutofillType::PHONE_NUMBER, phone.subgroup());
+ EXPECT_EQ(AutofillType::PHONE, phone.group());
// Last value, to check any offset errors.
AutofillType last(COMPANY_NAME);
EXPECT_EQ(COMPANY_NAME, last.field_type());
EXPECT_EQ(AutofillType::COMPANY, last.group());
- EXPECT_EQ(AutofillType::NO_SUBGROUP, last.subgroup());
// Boundary (error) condition.
AutofillType boundary(MAX_VALID_FIELD_TYPE);
EXPECT_EQ(UNKNOWN_TYPE, boundary.field_type());
EXPECT_EQ(AutofillType::NO_GROUP, boundary.group());
- EXPECT_EQ(AutofillType::NO_SUBGROUP, boundary.subgroup());
// Beyond the boundary (error) condition.
AutofillType beyond(static_cast<AutofillFieldType>(MAX_VALID_FIELD_TYPE+10));
EXPECT_EQ(UNKNOWN_TYPE, beyond.field_type());
EXPECT_EQ(AutofillType::NO_GROUP, beyond.group());
- EXPECT_EQ(AutofillType::NO_SUBGROUP, beyond.subgroup());
// In-between value. Missing from enum but within range. Error condition.
AutofillType between(static_cast<AutofillFieldType>(16));
EXPECT_EQ(UNKNOWN_TYPE, between.field_type());
EXPECT_EQ(AutofillType::NO_GROUP, between.group());
- EXPECT_EQ(AutofillType::NO_SUBGROUP, between.subgroup());
}
} // namespace
« no previous file with comments | « chrome/browser/autofill/autofill_type.cc ('k') | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698