Chromium Code Reviews| 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/autofill_dialog_i18n_input.h" | 5 #include "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h" |
| 6 | 6 |
| 7 #include "components/autofill/core/browser/field_types.h" | 7 #include "components/autofill/core/browser/field_types.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/addre ss_ui.h" | 9 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_ui .h" |
| 10 | 10 |
| 11 namespace autofill { | 11 namespace autofill { |
| 12 namespace i18ninput { | 12 namespace i18ninput { |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 const size_t kNumberOfAddressLinesUS = 6; | 16 const size_t kNumberOfAddressLinesUS = 6; |
| 17 | 17 |
| 18 } // namespace | 18 } // namespace |
| 19 | 19 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 for (size_t i = 0; i < inputs.size(); ++i) { | 71 for (size_t i = 0; i < inputs.size(); ++i) { |
| 72 EXPECT_NE(ADDRESS_HOME_LINE2, inputs[i].type); | 72 EXPECT_NE(ADDRESS_HOME_LINE2, inputs[i].type); |
| 73 } | 73 } |
| 74 EXPECT_EQ("fr", language_code); | 74 EXPECT_EQ("fr", language_code); |
| 75 } | 75 } |
| 76 | 76 |
| 77 TEST(AutofillDialogI18nInput, FullySupportedCountries) { | 77 TEST(AutofillDialogI18nInput, FullySupportedCountries) { |
| 78 const std::vector<std::string>& regions = | 78 const std::vector<std::string>& regions = |
| 79 ::i18n::addressinput::GetRegionCodes(); | 79 ::i18n::addressinput::GetRegionCodes(); |
| 80 for (size_t i = 0; i < regions.size(); ++i) { | 80 for (size_t i = 0; i < regions.size(); ++i) { |
| 81 bool should_be_supported = !(regions[i] == "KR" || regions[i] == "CN"); | 81 // TODO(rouslan): Support dependent locality. http://crbug.com/340929 |
| 82 bool should_be_supported = !(regions[i] == "KR" || | |
|
Evan Stade
2014/06/12 00:18:08
you can just leave this alone, it's about to get d
please use gerrit instead
2014/06/13 19:22:09
Done.
| |
| 83 regions[i] == "CN" || | |
| 84 regions[i] == "MX" || | |
| 85 regions[i] == "TH"); | |
| 82 EXPECT_EQ(should_be_supported, CountryIsFullySupported(regions[i])); | 86 EXPECT_EQ(should_be_supported, CountryIsFullySupported(regions[i])); |
| 83 } | 87 } |
| 84 } | 88 } |
| 85 | 89 |
| 86 } // namespace i18ninput | 90 } // namespace i18ninput |
| 87 } // namespace autofill | 91 } // namespace autofill |
| OLD | NEW |