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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/string16.h" | 7 #include "base/string16.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/autofill/address.h" | 9 #include "chrome/browser/autofill/address.h" |
10 #include "chrome/browser/autofill/autofill_type.h" | 10 #include "chrome/browser/autofill/autofill_type.h" |
11 #include "chrome/test/testing_browser_process_test.h" | 11 #include "chrome/test/base/testing_browser_process_test.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 typedef TestingBrowserProcessTest AddressTest; | 14 typedef TestingBrowserProcessTest AddressTest; |
15 | 15 |
16 // Test that the getters and setters for country code are working. | 16 // Test that the getters and setters for country code are working. |
17 TEST_F(AddressTest, CountryCode) { | 17 TEST_F(AddressTest, CountryCode) { |
18 Address address; | 18 Address address; |
19 EXPECT_EQ(std::string(), address.country_code()); | 19 EXPECT_EQ(std::string(), address.country_code()); |
20 | 20 |
21 address.set_country_code("US"); | 21 address.set_country_code("US"); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 EXPECT_EQ(0U, matching_types.size()); | 109 EXPECT_EQ(0U, matching_types.size()); |
110 } | 110 } |
111 | 111 |
112 // Make sure that garbage values don't match when the country code is empty. | 112 // Make sure that garbage values don't match when the country code is empty. |
113 address.set_country_code(""); | 113 address.set_country_code(""); |
114 EXPECT_EQ(std::string(), address.country_code()); | 114 EXPECT_EQ(std::string(), address.country_code()); |
115 FieldTypeSet matching_types; | 115 FieldTypeSet matching_types; |
116 address.GetMatchingTypes(ASCIIToUTF16("Garbage"), &matching_types); | 116 address.GetMatchingTypes(ASCIIToUTF16("Garbage"), &matching_types); |
117 EXPECT_EQ(0U, matching_types.size()); | 117 EXPECT_EQ(0U, matching_types.size()); |
118 } | 118 } |
OLD | NEW |