Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc

Issue 2966103002: [Payments] Show admin area complete names on PR form. (Closed)
Patch Set: Show the name in the appropriate language. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc
diff --git a/third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc b/third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc
index 54c37e49383e1c1d44a18206ade19db6a66c763f..734b51d340c72a1b7ce3cc2f5f92a96442acb154 100644
--- a/third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc
+++ b/third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc
@@ -120,23 +120,27 @@ AddressValidator* LargeAddressValidatorTest::validator_ = NULL;
TEST_F(AddressValidatorTest, SubKeysLoaded) {
const std::string country_code = "US";
- const std::string first_state = "AL";
+ const std::string state_code = "AL";
+ const std::string state_name = "Alabama";
+ const std::string language = "fr";
validator_->LoadRules(country_code);
- std::vector<std::string> sub_keys =
- validator_->GetRegionSubKeys(country_code);
+ std::vector<std::pair<std::string, std::string>> sub_keys =
+ validator_->GetRegionSubKeys(country_code, language);
ASSERT_FALSE(sub_keys.empty());
- ASSERT_EQ(sub_keys[0], first_state);
+ ASSERT_EQ(state_code, sub_keys[0].first);
+ ASSERT_EQ(state_name, sub_keys[0].second);
}
TEST_F(AddressValidatorTest, SubKeysNotExist) {
const std::string country_code = "OZ";
+ const std::string language = "en";
set_expected_status(AddressValidator::RULES_UNAVAILABLE);
validator_->LoadRules(country_code);
- std::vector<std::string> sub_keys =
- validator_->GetRegionSubKeys(country_code);
+ std::vector<std::pair<std::string, std::string>> sub_keys =
+ validator_->GetRegionSubKeys(country_code, language);
ASSERT_TRUE(sub_keys.empty());
}

Powered by Google App Engine
This is Rietveld 408576698