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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc

Issue 298863012: Use upstream libaddressinput in Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review. 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/autofill_dialog_controller_browsertest.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc
index 1ebd14e42d519207cc9e2369bd7e43fa1161ec47..70759266fbf996ade1ae78806e192c4df84b3454 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc
@@ -81,7 +81,6 @@ namespace {
using testing::Return;
using testing::_;
-using ::i18n::addressinput::AddressValidator;
void MockCallback(AutofillManagerDelegate::RequestAutocompleteResult,
const base::string16& message,
@@ -230,7 +229,7 @@ class TestAutofillDialogController : public AutofillDialogControllerImpl {
return &const_cast<TestAutofillDialogController*>(this)->test_manager_;
}
- virtual AddressValidator* GetValidator() OVERRIDE {
+ virtual PreloadAddressValidator* GetValidator() OVERRIDE {
return &mock_validator_;
}
@@ -1715,8 +1714,8 @@ IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, RulesLoaded) {
controller()->set_use_validation(true);
EXPECT_CALL(*controller()->GetMockValidator(),
- ValidateAddress(CountryCodeMatcher("DE"), _, _)).Times(2).
- WillOnce(Return(AddressValidator::RULES_NOT_READY));
+ Validate(CountryCodeMatcher("DE"), _, _)).Times(2).
please use gerrit instead 2014/06/05 22:22:47 To reduce reviewer burden: change Validate() back
please use gerrit instead 2014/06/09 23:28:16 Done.
+ WillOnce(Return(PreloadAddressValidator::RULES_NOT_READY));
// Validation should occur on country change and see the rules haven't loaded.
scoped_ptr<AutofillDialogViewTester> view = GetViewTester();
@@ -1725,14 +1724,14 @@ IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, RulesLoaded) {
view->ActivateInput(ADDRESS_HOME_COUNTRY);
// Different country loaded, validation should not occur.
- controller()->OnAddressValidationRulesLoaded("FR", true);
+ controller()->AddressValidationRulesLoaded(true, "FR", 0);
please use gerrit instead 2014/06/05 22:22:47 To reduce reviewer burden: AddressValidationRulesL
// Relevant country loaded, validation should occur.
- controller()->OnAddressValidationRulesLoaded("DE", true);
+ controller()->AddressValidationRulesLoaded(true, "DE", 0);
// Relevant country loaded but revalidation already happened, no further
// validation should occur.
- controller()->OnAddressValidationRulesLoaded("DE", false);
+ controller()->AddressValidationRulesLoaded(false, "DE", 0);
// Cancelling the dialog causes additional validation to see if the user
// cancelled with invalid fields, so verify and clear here.

Powered by Google App Engine
This is Rietveld 408576698