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

Unified Diff: chrome/browser/ui/autofill/mock_address_validator.h

Issue 298863012: Use upstream libaddressinput in Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Work in progress for suggestions impl. Created 6 years, 6 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: chrome/browser/ui/autofill/mock_address_validator.h
diff --git a/chrome/browser/ui/autofill/mock_address_validator.h b/chrome/browser/ui/autofill/mock_address_validator.h
index d9585617c4ba6b6e68c06177eee9f96bca7d9ca1..a7f41cf518eb594cc111e5c995ebc62e8c487b42 100644
--- a/chrome/browser/ui/autofill/mock_address_validator.h
+++ b/chrome/browser/ui/autofill/mock_address_validator.h
@@ -7,17 +7,17 @@
#include "base/basictypes.h"
#include "testing/gmock/include/gmock/gmock.h"
-#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_data.h"
-#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_validator.h"
+#include "third_party/libaddressinput/chromium/preload_address_validator.h"
+#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_data.h"
namespace autofill {
MATCHER_P(CountryCodeMatcher, country_code, "Checks an AddressData's country") {
// |arg| is an AddressData object.
- return arg.country_code == country_code;
+ return arg.region_code == country_code;
}
-class MockAddressValidator : public ::i18n::addressinput::AddressValidator {
+class MockAddressValidator : public AddressValidator {
public:
MockAddressValidator();
virtual ~MockAddressValidator();
@@ -25,13 +25,13 @@ class MockAddressValidator : public ::i18n::addressinput::AddressValidator {
MOCK_METHOD1(LoadRules, void(const std::string& country_code));
MOCK_CONST_METHOD3(ValidateAddress,
- ::i18n::addressinput::AddressValidator::Status(
+ AddressValidator::Status(
const ::i18n::addressinput::AddressData& address,
- const ::i18n::addressinput::AddressProblemFilter& filter,
- ::i18n::addressinput::AddressProblems* problems));
+ const ::i18n::addressinput::FieldProblemMap* filter,
+ ::i18n::addressinput::FieldProblemMap* problems));
MOCK_CONST_METHOD4(GetSuggestions,
- ::i18n::addressinput::AddressValidator::Status(
+ AddressValidator::Status(
const ::i18n::addressinput::AddressData& user_input,
::i18n::addressinput::AddressField focused_field,
size_t suggestions_limit,

Powered by Google App Engine
This is Rietveld 408576698