| Index: chrome/browser/password_manager/credential_manager_browsertest.cc
|
| diff --git a/chrome/browser/password_manager/credential_manager_browsertest.cc b/chrome/browser/password_manager/credential_manager_browsertest.cc
|
| index 3d7364597185a01c83ce41062db818d1f85669ec..6a7665ebcc02c0aaae425eae87beed7f0d8fea6f 100644
|
| --- a/chrome/browser/password_manager/credential_manager_browsertest.cc
|
| +++ b/chrome/browser/password_manager/credential_manager_browsertest.cc
|
| @@ -157,9 +157,9 @@ class CredentialManagerBrowserTest : public PasswordManagerBrowserTestBase {
|
| ASSERT_TRUE(client->was_store_ever_called());
|
|
|
| BubbleObserver prompt_observer(WebContents());
|
| - prompt_observer.WaitForSavePrompt();
|
| - ASSERT_TRUE(prompt_observer.IsShowingSavePrompt());
|
| - prompt_observer.AcceptSavePrompt();
|
| + prompt_observer.WaitForAutomaticSavePrompt();
|
| + ASSERT_TRUE(prompt_observer.IsSavePromptShownAutomatically());
|
| + prompt_observer.AcceptSavePrompt(true /* expected_automatic_prompt */);
|
|
|
| WaitForPasswordStore();
|
|
|
| @@ -329,8 +329,8 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
|
| // after the store replies.
|
| WaitForPasswordStore();
|
| BubbleObserver prompt_observer(WebContents());
|
| - EXPECT_FALSE(prompt_observer.IsShowingSavePrompt());
|
| - EXPECT_FALSE(prompt_observer.IsShowingUpdatePrompt());
|
| + EXPECT_FALSE(prompt_observer.IsSavePromptShownAutomatically());
|
| + EXPECT_FALSE(prompt_observer.IsUpdatePromptShownAutomatically());
|
|
|
| // There should be an entry for both psl.example.com and www.example.com.
|
| password_manager::TestPasswordStore::PasswordMap passwords =
|
| @@ -421,7 +421,7 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
|
| BubbleObserver prompt_observer(WebContents());
|
| // The autofill password manager shouldn't react to the successful login
|
| // because it was suppressed when the site got the credential back.
|
| - EXPECT_FALSE(prompt_observer.IsShowingSavePrompt());
|
| + EXPECT_FALSE(prompt_observer.IsSavePromptShownAutomatically());
|
| }
|
|
|
| // Regression test for https://crbug.com/736357.
|
| @@ -479,9 +479,9 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest,
|
| "navigator.credentials.store(c);"));
|
|
|
| BubbleObserver prompt_observer(WebContents());
|
| - prompt_observer.WaitForSavePrompt();
|
| - ASSERT_TRUE(prompt_observer.IsShowingSavePrompt());
|
| - prompt_observer.AcceptSavePrompt();
|
| + prompt_observer.WaitForAutomaticSavePrompt();
|
| + ASSERT_TRUE(prompt_observer.IsSavePromptShownAutomatically());
|
| + prompt_observer.AcceptSavePrompt(true /* expected_automatic_prompt */);
|
| WaitForPasswordStore();
|
|
|
| EXPECT_TRUE(client->has_binding_for_credential_manager());
|
| @@ -546,8 +546,8 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest, SaveViaAPIAndAutofill) {
|
|
|
| WaitForPasswordStore();
|
| BubbleObserver prompt_observer(WebContents());
|
| - ASSERT_TRUE(prompt_observer.IsShowingSavePrompt());
|
| - prompt_observer.AcceptSavePrompt();
|
| + ASSERT_TRUE(prompt_observer.IsSavePromptShownAutomatically());
|
| + prompt_observer.AcceptSavePrompt(true /* expected_automatic_prompt */);
|
|
|
| WaitForPasswordStore();
|
| password_manager::TestPasswordStore::PasswordMap stored =
|
| @@ -604,8 +604,8 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest, UpdateViaAPIAndAutofill) {
|
| // after the store replies.
|
| WaitForPasswordStore();
|
| BubbleObserver prompt_observer(WebContents());
|
| - EXPECT_FALSE(prompt_observer.IsShowingSavePrompt());
|
| - EXPECT_FALSE(prompt_observer.IsShowingUpdatePrompt());
|
| + EXPECT_FALSE(prompt_observer.IsSavePromptShownAutomatically());
|
| + EXPECT_FALSE(prompt_observer.IsUpdatePromptShownAutomatically());
|
| signin_form.skip_zero_click = false;
|
| signin_form.times_used = 1;
|
| signin_form.password_value = base::ASCIIToUTF16("API");
|
| @@ -623,8 +623,8 @@ IN_PROC_BROWSER_TEST_F(CredentialManagerBrowserTest, CredentialsAutofilled) {
|
| "var c = new PasswordCredential({ id: 'user', password: '12345' });"
|
| "navigator.credentials.store(c);"));
|
| BubbleObserver bubble_observer(WebContents());
|
| - bubble_observer.WaitForSavePrompt();
|
| - bubble_observer.AcceptSavePrompt();
|
| + bubble_observer.WaitForAutomaticSavePrompt();
|
| + bubble_observer.AcceptSavePrompt(true /* expected_automatic_prompt */);
|
|
|
| // Reload the page and make sure it's autofilled.
|
| NavigateToFile("/password/password_form.html");
|
|
|