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

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

Issue 663643002: requestAutocomplete (desktop): don't get stuck in infinite loop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 464eaf4e028bf6a25517e8b8a845095e7a5d383d..5f6b0ba5c4fa7e1c861652d2d1f54bea720a8063 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc
@@ -141,10 +141,14 @@ class TestAutofillDialogController : public AutofillDialogControllerImpl {
virtual ~TestAutofillDialogController() {}
- virtual GURL SignInUrl() const override {
+ GURL FakeSignInUrl() const {
return GURL(chrome::kChromeUIVersionURL);
}
+ virtual void ShowSignIn(const GURL& url) override {
+ AutofillDialogControllerImpl::ShowSignIn(FakeSignInUrl());
+ }
+
virtual void ViewClosed() override {
message_loop_runner_->Quit();
AutofillDialogControllerImpl::ViewClosed();
@@ -1174,7 +1178,7 @@ IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, SimulateSuccessfulSignIn) {
wallet::GetTestWalletItemsWithRequiredAction(wallet::GAIA_AUTH));
NavEntryCommittedObserver sign_in_page_observer(
- controller()->SignInUrl(),
+ controller()->FakeSignInUrl(),
content::NotificationService::AllSources());
// Simulate a user clicking "Sign In" (which loads dialog's web contents).
@@ -1191,7 +1195,7 @@ IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, SimulateSuccessfulSignIn) {
wallet::GetSignInContinueUrl(),
content::NotificationService::AllSources());
- EXPECT_EQ(sign_in_contents->GetURL(), controller()->SignInUrl());
+ EXPECT_EQ(sign_in_contents->GetURL(), controller()->FakeSignInUrl());
AccountChooserModel* account_chooser_model =
controller()->AccountChooserModelForTesting();
@@ -1250,7 +1254,7 @@ IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, AddAccount) {
account_chooser_model->GetItemCount() - 1);
NavEntryCommittedObserver sign_in_page_observer(
- controller()->SignInUrl(),
+ controller()->FakeSignInUrl(),
content::NotificationService::AllSources());
// Simulate a user clicking "add account".
@@ -1268,7 +1272,7 @@ IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, AddAccount) {
wallet::GetSignInContinueUrl(),
content::NotificationService::AllSources());
- EXPECT_EQ(sign_in_contents->GetURL(), controller()->SignInUrl());
+ EXPECT_EQ(sign_in_contents->GetURL(), controller()->FakeSignInUrl());
EXPECT_FALSE(account_chooser_model->WalletIsSelected());
@@ -1407,7 +1411,7 @@ IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest,
wallet::GetTestWalletItemsWithRequiredAction(wallet::GAIA_AUTH));
NavEntryCommittedObserver sign_in_page_observer(
- controller()->SignInUrl(),
+ controller()->FakeSignInUrl(),
content::NotificationService::AllSources());
controller()->SignInLinkClicked();
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698