| Index: chrome/browser/ui/views/passwords/password_dialog_view_browsertest.cc
|
| diff --git a/chrome/browser/ui/views/passwords/password_dialog_view_browsertest.cc b/chrome/browser/ui/views/passwords/password_dialog_view_browsertest.cc
|
| index 9453c8a6d4ddce4139f03a5f6864c7181e785db3..6f2edff46726ccf44f305de84039a13adff5cbb0 100644
|
| --- a/chrome/browser/ui/views/passwords/password_dialog_view_browsertest.cc
|
| +++ b/chrome/browser/ui/views/passwords/password_dialog_view_browsertest.cc
|
| @@ -122,8 +122,7 @@ class PasswordDialogViewTest : public InProcessBrowserTest {
|
| browser()->tab_strip_model()->GetActiveWebContents());
|
| }
|
|
|
| - MOCK_METHOD1(OnChooseCredential,
|
| - void(const password_manager::CredentialInfo&));
|
| + MOCK_METHOD1(OnChooseCredential, void(const autofill::PasswordForm*));
|
|
|
| private:
|
| TestManagePasswordsUIController* controller_;
|
| @@ -196,10 +195,7 @@ IN_PROC_BROWSER_TEST_F(PasswordDialogViewTest,
|
| ScopedVector<autofill::PasswordForm>(), origin);
|
| ASSERT_TRUE(controller()->current_account_chooser());
|
| AccountChooserDialogView* dialog = controller()->current_account_chooser();
|
| - EXPECT_CALL(*this,
|
| - OnChooseCredential(Field(
|
| - &password_manager::CredentialInfo::type,
|
| - password_manager::CredentialType::CREDENTIAL_TYPE_EMPTY)));
|
| + EXPECT_CALL(*this, OnChooseCredential(nullptr));
|
| EXPECT_CALL(*controller(), OnDialogClosed());
|
| dialog->GetWidget()->Close();
|
|
|
| @@ -230,10 +226,7 @@ IN_PROC_BROWSER_TEST_F(
|
| // After picking a credential, we should pass it back to the caller via the
|
| // callback, but we should not pop up the autosignin prompt as there were
|
| // multiple credentials available.
|
| - EXPECT_CALL(
|
| - *this, OnChooseCredential(Field(
|
| - &password_manager::CredentialInfo::type,
|
| - password_manager::CredentialType::CREDENTIAL_TYPE_FEDERATED)));
|
| + EXPECT_CALL(*this, OnChooseCredential(testing::Pointee(form)));
|
| EXPECT_TRUE(
|
| password_bubble_experiment::ShouldShowAutoSignInPromptFirstRunExperience(
|
| browser()->profile()->GetPrefs()));
|
| @@ -257,10 +250,7 @@ IN_PROC_BROWSER_TEST_F(PasswordDialogViewTest,
|
|
|
| EXPECT_TRUE(controller()->current_account_chooser());
|
| AccountChooserDialogView* dialog = controller()->current_account_chooser();
|
| - EXPECT_CALL(*this,
|
| - OnChooseCredential(Field(
|
| - &password_manager::CredentialInfo::type,
|
| - password_manager::CredentialType::CREDENTIAL_TYPE_EMPTY)));
|
| + EXPECT_CALL(*this, OnChooseCredential(nullptr));
|
| EXPECT_CALL(*controller(), OnDialogClosed());
|
| dialog->GetWidget()->Close();
|
| EXPECT_FALSE(controller()->current_autosignin_prompt());
|
| @@ -283,10 +273,7 @@ IN_PROC_BROWSER_TEST_F(PasswordDialogViewTest,
|
|
|
| // After picking a credential, we should pass it back to the caller via the
|
| // callback, and pop up the autosignin prompt iff we should show it.
|
| - EXPECT_CALL(*this,
|
| - OnChooseCredential(Field(
|
| - &password_manager::CredentialInfo::type,
|
| - password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD)));
|
| + EXPECT_CALL(*this, OnChooseCredential(testing::Pointee(form)));
|
| EXPECT_TRUE(
|
| password_bubble_experiment::ShouldShowAutoSignInPromptFirstRunExperience(
|
| browser()->profile()->GetPrefs()));
|
| @@ -316,10 +303,7 @@ IN_PROC_BROWSER_TEST_F(PasswordDialogViewTest,
|
|
|
| // After picking a credential, we should pass it back to the caller via the
|
| // callback, and pop up the autosignin prompt iff we should show it.
|
| - EXPECT_CALL(*this,
|
| - OnChooseCredential(Field(
|
| - &password_manager::CredentialInfo::type,
|
| - password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD)));
|
| + EXPECT_CALL(*this, OnChooseCredential(testing::Pointee(form)));
|
| browser()->profile()->GetPrefs()->SetBoolean(
|
| password_manager::prefs::kCredentialsEnableAutosignin, false);
|
| controller()->ChooseCredential(
|
| @@ -357,10 +341,7 @@ IN_PROC_BROWSER_TEST_F(PasswordDialogViewTest,
|
| controller()->GetState());
|
| EXPECT_TRUE(controller()->current_account_chooser());
|
|
|
| - EXPECT_CALL(*this,
|
| - OnChooseCredential(Field(
|
| - &password_manager::CredentialInfo::type,
|
| - password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD)));
|
| + EXPECT_CALL(*this, OnChooseCredential(testing::Pointee(form)));
|
| controller()->ChooseCredential(
|
| form, password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD);
|
|
|
|
|