| 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 13b5a8b4cc32ac547bdc2ef42cc3b7bb7b602a33..ba71c2b25e965b5a73a00ef9307362bc9b2cc6e0 100644
|
| --- a/third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc
|
| +++ b/third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc
|
| @@ -5,6 +5,7 @@
|
| #include "third_party/libaddressinput/chromium/chrome_address_validator.h"
|
|
|
| #include <stddef.h>
|
| +#include <set>
|
| #include <string>
|
| #include <utility>
|
| #include <vector>
|
| @@ -67,14 +68,19 @@ class AddressValidatorTest : public testing::Test, LoadRulesListener {
|
|
|
| private:
|
| // LoadRulesListener implementation.
|
| - virtual void OnAddressValidationRulesLoaded(const std::string& country_code,
|
| - bool success) override {
|
| + void OnAddressRulesLoaded(const std::string& country_code,
|
| + bool success) override {
|
| AddressData address_data;
|
| address_data.region_code = country_code;
|
| FieldProblemMap dummy;
|
| AddressValidator::Status status =
|
| validator_->ValidateAddress(address_data, NULL, &dummy);
|
| ASSERT_EQ(success, status == AddressValidator::SUCCESS);
|
| +
|
| + std::vector<std::string> sub_keys =
|
| + validator_->GetRegionSubKeys(country_code);
|
| + ASSERT_FALSE(sub_keys.empty());
|
| +
|
| }
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AddressValidatorTest);
|
| @@ -758,7 +764,7 @@ class FailingAddressValidatorTest : public testing::Test, LoadRulesListener {
|
| virtual ~TestAddressValidator() {}
|
|
|
| protected:
|
| - virtual base::TimeDelta GetBaseRetryPeriod() const override {
|
| + base::TimeDelta GetBaseRetryPeriod() const override {
|
| return base::TimeDelta::FromSeconds(0);
|
| }
|
|
|
| @@ -770,7 +776,7 @@ class FailingAddressValidatorTest : public testing::Test, LoadRulesListener {
|
| // data.
|
| class FailingSource : public Source {
|
| public:
|
| - explicit FailingSource()
|
| + FailingSource()
|
| : failures_number_(0), attempts_number_(0), actual_source_(true) {}
|
| virtual ~FailingSource() {}
|
|
|
| @@ -781,8 +787,7 @@ class FailingAddressValidatorTest : public testing::Test, LoadRulesListener {
|
|
|
| // Source implementation.
|
| // Always fails for the first |failures_number| times.
|
| - virtual void Get(const std::string& url,
|
| - const Callback& callback) const override {
|
| + void Get(const std::string& url, const Callback& callback) const override {
|
| ++attempts_number_;
|
| // |callback| takes ownership of the |new std::string|.
|
| if (failures_number_-- > 0)
|
| @@ -823,8 +828,8 @@ class FailingAddressValidatorTest : public testing::Test, LoadRulesListener {
|
|
|
| private:
|
| // LoadRulesListener implementation.
|
| - virtual void OnAddressValidationRulesLoaded(const std::string&,
|
| - bool success) override {
|
| + void OnAddressRulesLoaded(const std::string&,
|
| + bool success) override {
|
| load_rules_success_ = success;
|
| }
|
|
|
|
|