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 17cae7956fc27e4ed525fcf618c95ed7c4fa6ad8..13b5a8b4cc32ac547bdc2ef42cc3b7bb7b602a33 100644 |
--- a/third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc |
+++ b/third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc |
@@ -5,7 +5,6 @@ |
#include "third_party/libaddressinput/chromium/chrome_address_validator.h" |
#include <stddef.h> |
-#include <set> |
#include <string> |
#include <utility> |
#include <vector> |
@@ -68,8 +67,8 @@ |
private: |
// LoadRulesListener implementation. |
- void OnAddressRulesLoaded(const std::string& country_code, |
- bool success) override { |
+ virtual void OnAddressValidationRulesLoaded(const std::string& country_code, |
+ bool success) override { |
AddressData address_data; |
address_data.region_code = country_code; |
FieldProblemMap dummy; |
@@ -110,26 +109,6 @@ |
}; |
AddressValidator* LargeAddressValidatorTest::validator_ = NULL; |
- |
-TEST_F(AddressValidatorTest, SubKeysLoaded) { |
- const std::string country_code = "US"; |
- const std::string first_state = "AL"; |
- |
- validator_->LoadRules(country_code); |
- std::vector<std::string> sub_keys = |
- validator_->GetRegionSubKeys(country_code); |
- ASSERT_FALSE(sub_keys.empty()); |
- ASSERT_EQ(sub_keys[0], first_state); |
-} |
- |
-TEST_F(AddressValidatorTest, SubKeysNotLoaded) { |
- const std::string country_code = "ZZ"; |
- |
- validator_->LoadRules(country_code); |
- std::vector<std::string> sub_keys = |
- validator_->GetRegionSubKeys(country_code); |
- ASSERT_TRUE(sub_keys.empty()); |
-} |
TEST_F(AddressValidatorTest, RegionHasRules) { |
const std::vector<std::string>& region_codes = GetRegionCodes(); |
@@ -779,7 +758,7 @@ |
virtual ~TestAddressValidator() {} |
protected: |
- base::TimeDelta GetBaseRetryPeriod() const override { |
+ virtual base::TimeDelta GetBaseRetryPeriod() const override { |
return base::TimeDelta::FromSeconds(0); |
} |
@@ -791,7 +770,7 @@ |
// data. |
class FailingSource : public Source { |
public: |
- FailingSource() |
+ explicit FailingSource() |
: failures_number_(0), attempts_number_(0), actual_source_(true) {} |
virtual ~FailingSource() {} |
@@ -802,7 +781,8 @@ |
// Source implementation. |
// Always fails for the first |failures_number| times. |
- void Get(const std::string& url, const Callback& callback) const override { |
+ virtual 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) |
@@ -843,7 +823,8 @@ |
private: |
// LoadRulesListener implementation. |
- void OnAddressRulesLoaded(const std::string&, bool success) override { |
+ virtual void OnAddressValidationRulesLoaded(const std::string&, |
+ bool success) override { |
load_rules_success_ = success; |
} |