Chromium Code Reviews| Index: chrome/browser/password_manager/password_manager_test_base.h |
| diff --git a/chrome/browser/password_manager/password_manager_test_base.h b/chrome/browser/password_manager/password_manager_test_base.h |
| index 288facf38d4c76a9b2282d42e9a10695749d1383..d831a2d426c788aec31e2b0ddc57b1c7996acb2c 100644 |
| --- a/chrome/browser/password_manager/password_manager_test_base.h |
| +++ b/chrome/browser/password_manager/password_manager_test_base.h |
| @@ -65,18 +65,28 @@ class BubbleObserver { |
| public: |
| explicit BubbleObserver(content::WebContents* web_contents); |
| - // Checks if the save prompt is being currently shown. |
| - bool IsShowingSavePrompt() const; |
| + // Checks if the save prompt is being currently available due to both manual |
| + // fallback or successful login. |
| + bool IsSavePromptAvailable() const; |
| - // Checks if the update prompt is being currently shown. |
| - bool IsShowingUpdatePrompt() const; |
| + // Checks if the update prompt is being currently available due to both manual |
| + // fallback or successful login. |
| + bool IsUpdatePromptAvailable() const; |
| + |
| + // Checks if the save prompt was shown automatically. This can only be called |
|
vasilii
2017/08/09 10:31:32
Just copy the sentence about PasswordManagerBrowse
kolos1
2017/08/09 11:37:22
Done.
|
| + // on the custom tab. |
| + bool IsSavePromptShownAutomatically() const; |
| + |
| + // Checks if the update prompt was shown automatically. This can only be |
| + // called on the custom tab. |
| + bool IsUpdatePromptShownAutomatically() const; |
| // Dismisses the prompt currently open and moves the controller to the |
| // inactive state. |
| void Dismiss() const; |
| - // Expecting that the prompt is shown, saves the password. Checks that the |
| - // prompt is no longer visible afterwards. |
| + // Expecting that the prompt is available, saves the password. At the end, |
| + // checks that the prompt is no longer available afterwards. |
| void AcceptSavePrompt() const; |
| // Expecting that the prompt is shown, update |form| with the password from |
| @@ -97,7 +107,12 @@ class BubbleObserver { |
| // Returns once the save prompt pops up or it's already shown. |
| // |web_contents| must be the custom one returned by |
| // PasswordManagerBrowserTestBase. |
| - void WaitForSavePrompt() const; |
| + void WaitForAutomaticSavePrompt() const; |
| + |
| + // Returns once the fallback for saving becomes available. |
| + // |web_contents| must be the custom one returned by |
| + // PasswordManagerBrowserTestBase. |
| + void WaitForFallbackForSaving() const; |
| private: |
| ManagePasswordsUIController* const passwords_ui_controller_; |
| @@ -162,6 +177,11 @@ class PasswordManagerBrowserTestBase : public InProcessBrowserTest { |
| // Synchronoulsy adds the given host to the list of valid HSTS hosts. |
| void AddHSTSHost(const std::string& host); |
| + // Checks that |password_store| stores only one credential with |username| and |
| + // |password|. |
| + void CheckThatCredentialsStored(const base::string16& username, |
| + const base::string16& password); |
| + |
| // Accessors |
| // Return the first created tab with a custom ManagePasswordsUIController. |
| content::WebContents* WebContents(); |