OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/autofill/browser/autofill_type.h" | 5 #include "components/autofill/core/browser/autofill_type.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
7 | 7 |
8 namespace autofill { | 8 namespace autofill { |
9 namespace { | 9 namespace { |
10 | 10 |
11 TEST(AutofillTypeTest, AutofillTypes) { | 11 TEST(AutofillTypeTest, AutofillTypes) { |
12 // No server data. | 12 // No server data. |
13 AutofillType none(NO_SERVER_DATA); | 13 AutofillType none(NO_SERVER_DATA); |
14 EXPECT_EQ(NO_SERVER_DATA, none.field_type()); | 14 EXPECT_EQ(NO_SERVER_DATA, none.field_type()); |
15 EXPECT_EQ(AutofillType::NO_GROUP, none.group()); | 15 EXPECT_EQ(AutofillType::NO_GROUP, none.group()); |
(...skipping 29 matching lines...) Expand all Loading... |
45 EXPECT_EQ(AutofillType::NO_GROUP, beyond.group()); | 45 EXPECT_EQ(AutofillType::NO_GROUP, beyond.group()); |
46 | 46 |
47 // In-between value. Missing from enum but within range. Error condition. | 47 // In-between value. Missing from enum but within range. Error condition. |
48 AutofillType between(static_cast<AutofillFieldType>(16)); | 48 AutofillType between(static_cast<AutofillFieldType>(16)); |
49 EXPECT_EQ(UNKNOWN_TYPE, between.field_type()); | 49 EXPECT_EQ(UNKNOWN_TYPE, between.field_type()); |
50 EXPECT_EQ(AutofillType::NO_GROUP, between.group()); | 50 EXPECT_EQ(AutofillType::NO_GROUP, between.group()); |
51 } | 51 } |
52 | 52 |
53 } // namespace | 53 } // namespace |
54 } // namespace autofill | 54 } // namespace autofill |
OLD | NEW |