OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/autofill/country_combobox_model.h" | 5 #include "chrome/browser/ui/autofill/country_combobox_model.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
10 #include "components/autofill/core/browser/autofill_country.h" | 10 #include "components/autofill/core/browser/autofill_country.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 EXPECT_EQ(country.name(), model()->GetItemAt(0)); | 43 EXPECT_EQ(country.name(), model()->GetItemAt(0)); |
44 } | 44 } |
45 | 45 |
46 TEST_F(CountryComboboxModelTest, AllCountriesHaveComponents) { | 46 TEST_F(CountryComboboxModelTest, AllCountriesHaveComponents) { |
47 for (int i = 0; i < model()->GetItemCount(); ++i) { | 47 for (int i = 0; i < model()->GetItemCount(); ++i) { |
48 if (model()->IsItemSeparatorAt(i)) | 48 if (model()->IsItemSeparatorAt(i)) |
49 continue; | 49 continue; |
50 | 50 |
51 std::string country_code = model()->countries()[i]->country_code(); | 51 std::string country_code = model()->countries()[i]->country_code(); |
52 std::vector< ::i18n::addressinput::AddressUiComponent> components = | 52 std::vector< ::i18n::addressinput::AddressUiComponent> components = |
53 ::i18n::addressinput::BuildComponents(country_code); | 53 ::i18n::addressinput::BuildComponents( |
| 54 country_code, std::string(), NULL); |
54 EXPECT_FALSE(components.empty()); | 55 EXPECT_FALSE(components.empty()); |
55 } | 56 } |
56 } | 57 } |
57 | 58 |
58 } // namespace autofill | 59 } // namespace autofill |
OLD | NEW |