Index: chrome/browser/ui/autofill/autofill_dialog_i18n_input_unittest.cc |
diff --git a/chrome/browser/ui/autofill/autofill_dialog_i18n_input_unittest.cc b/chrome/browser/ui/autofill/autofill_dialog_i18n_input_unittest.cc |
index bfab9eaeaaec83429b97ae4dda2a01c3d9a14690..8e0c102b6ebdb337c3a886c86aca784790e0a272 100644 |
--- a/chrome/browser/ui/autofill/autofill_dialog_i18n_input_unittest.cc |
+++ b/chrome/browser/ui/autofill/autofill_dialog_i18n_input_unittest.cc |
@@ -6,7 +6,7 @@ |
#include "components/autofill/core/browser/field_types.h" |
#include "testing/gtest/include/gtest/gtest.h" |
-#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_ui.h" |
+#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_ui.h" |
namespace autofill { |
namespace i18ninput { |
@@ -31,7 +31,9 @@ TEST(AutofillDialogI18nInput, USShippingAddress) { |
TEST(AutofillDialogI18nInput, USBillingAddress) { |
DetailInputs inputs; |
- BuildAddressInputs(common::ADDRESS_TYPE_BILLING, "US", &inputs, NULL); |
please use gerrit instead
2014/06/05 22:22:48
To reduce reviewer burden: allow NULL for BuildAdd
please use gerrit instead
2014/06/09 23:28:16
Done.
|
+ std::string language_code; |
+ BuildAddressInputs(common::ADDRESS_TYPE_BILLING, "US", &inputs, |
+ &language_code); |
ASSERT_EQ(kNumberOfAddressLinesUS, inputs.size()); |
EXPECT_EQ(NAME_BILLING_FULL, inputs[0].type); |
@@ -40,7 +42,9 @@ TEST(AutofillDialogI18nInput, USBillingAddress) { |
TEST(AutofillDialogI18nInput, USCityStateAndZipCodeShareInputRow) { |
DetailInputs inputs; |
- BuildAddressInputs(common::ADDRESS_TYPE_SHIPPING, "US", &inputs, NULL); |
+ std::string language_code; |
+ BuildAddressInputs(common::ADDRESS_TYPE_SHIPPING, "US", &inputs, |
+ &language_code); |
ASSERT_EQ(kNumberOfAddressLinesUS, inputs.size()); |
int input_index = 2; |
@@ -77,9 +81,15 @@ TEST(AutofillDialogI18nInput, IvoryCoastNoStreetLine2) { |
TEST(AutofillDialogI18nInput, FullySupportedCountries) { |
const std::vector<std::string>& regions = |
::i18n::addressinput::GetRegionCodes(); |
- for (size_t i = 0; i < regions.size(); ++i) { |
- bool should_be_supported = !(regions[i] == "KR" || regions[i] == "CN"); |
- EXPECT_EQ(should_be_supported, CountryIsFullySupported(regions[i])); |
+ for (std::vector<std::string>::const_iterator |
+ it = regions.begin(); it != regions.end(); ++it) { |
+ // http://crbug.com/340929 |
+ bool should_be_supported = |
+ !(*it == "KR" || |
+ *it == "CN" || |
+ *it == "MX" || |
+ *it == "TH"); |
+ EXPECT_EQ(should_be_supported, CountryIsFullySupported(*it)) << *it; |
} |
} |