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

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

Issue 17392006: In components/autofill, move browser/ to core/browser/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to fix conflicts Created 7 years, 6 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 | « components/autofill/browser/autofill_type.cc ('k') | components/autofill/browser/autofill_xml_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/browser/autofill_type_unittest.cc
diff --git a/components/autofill/browser/autofill_type_unittest.cc b/components/autofill/browser/autofill_type_unittest.cc
deleted file mode 100644
index 14d4fef82d4787a855b8bdb0d6f8adc07aebc662..0000000000000000000000000000000000000000
--- a/components/autofill/browser/autofill_type_unittest.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/autofill/browser/autofill_type.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace autofill {
-namespace {
-
-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());
-
- // Unknown type.
- AutofillType unknown(UNKNOWN_TYPE);
- EXPECT_EQ(UNKNOWN_TYPE, unknown.field_type());
- EXPECT_EQ(AutofillType::NO_GROUP, unknown.group());
-
- // Type with group but no subgroup.
- AutofillType first(NAME_FIRST);
- EXPECT_EQ(NAME_FIRST, first.field_type());
- EXPECT_EQ(AutofillType::NAME, first.group());
-
- // 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());
-
- // Last value, to check any offset errors.
- AutofillType last(COMPANY_NAME);
- EXPECT_EQ(COMPANY_NAME, last.field_type());
- EXPECT_EQ(AutofillType::COMPANY, last.group());
-
- // Boundary (error) condition.
- AutofillType boundary(MAX_VALID_FIELD_TYPE);
- EXPECT_EQ(UNKNOWN_TYPE, boundary.field_type());
- EXPECT_EQ(AutofillType::NO_GROUP, boundary.group());
-
- // 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());
-
- // 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());
-}
-
-} // namespace
-} // namespace autofill
« no previous file with comments | « components/autofill/browser/autofill_type.cc ('k') | components/autofill/browser/autofill_xml_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698