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

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

Issue 23653052: [rAc] Fetch username concurrently with fetching Wallet items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes, including to checked in production code... Created 7 years, 3 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_unittest.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
index d229e5d3e5733d1d59cfabb4c92bfd4c8652c1d7..0f47b6d45dbe60a4d6a2c6101f3fa8203e45cef5 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
@@ -298,6 +298,9 @@ class TestAutofillDialogController
AutofillDialogControllerImpl::SubmitButtonDelayEndForTesting();
}
+ using AutofillDialogControllerImpl::
+ ClearLastWalletItemsFetchTimestampForTesting;
+
// Returns the number of times that the submit button was delayed.
int get_submit_button_delay_count() const {
return submit_button_delay_count_;
@@ -447,6 +450,8 @@ class AutofillDialogControllerTest : public ChromeRenderViewHostTestHarness {
controller_->Init(profile());
controller_->Show();
controller_->OnUserNameFetchSuccess(kFakeEmail);
+ EXPECT_CALL(*controller()->GetTestingWalletClient(), GetWalletItems(_));
+ controller_->OnDidFetchWalletCookieValue(std::string());
}
void FillCreditCardInputs() {
@@ -1711,7 +1716,7 @@ TEST_F(AutofillDialogControllerTest, WalletBanners) {
// Simulate non-signed-in case.
SetUpControllerWithFormData(DefaultFormData());
GoogleServiceAuthError error(GoogleServiceAuthError::NONE);
- controller()->OnUserNameFetchFailure(error);
+ controller()->OnPassiveSigninFailure(error);
EXPECT_EQ(0U, NotificationsOfType(
DialogNotification::WALLET_USAGE_CONFIRMATION).size());
@@ -2190,6 +2195,7 @@ TEST_F(AutofillDialogControllerTest, ReloadWalletItemsOnActivation) {
// Simulate switching away from the tab and back. This should issue a request
// for wallet items.
+ controller()->ClearLastWalletItemsFetchTimestampForTesting();
EXPECT_CALL(*controller()->GetTestingWalletClient(), GetWalletItems(_));
controller()->TabActivated();
@@ -2238,6 +2244,7 @@ TEST_F(AutofillDialogControllerTest,
// Simulate switching away from the tab and back. This should issue a request
// for wallet items.
+ controller()->ClearLastWalletItemsFetchTimestampForTesting();
EXPECT_CALL(*controller()->GetTestingWalletClient(), GetWalletItems(_));
controller()->TabActivated();
@@ -2275,6 +2282,7 @@ TEST_F(AutofillDialogControllerTest, ReloadWithEmptyWalletItems) {
controller()->MenuModelForSection(SECTION_CC_BILLING)->ActivatedAt(1);
controller()->MenuModelForSection(SECTION_SHIPPING)->ActivatedAt(1);
+ controller()->ClearLastWalletItemsFetchTimestampForTesting();
EXPECT_CALL(*controller()->GetTestingWalletClient(), GetWalletItems(_));
controller()->TabActivated();

Powered by Google App Engine
This is Rietveld 408576698