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..e0be3b1cf195415d799c4f354f795654a2bb8683 100644 |
| --- a/chrome/browser/password_manager/password_manager_test_base.h |
| +++ b/chrome/browser/password_manager/password_manager_test_base.h |
| @@ -18,6 +18,9 @@ |
| namespace autofill { |
| struct PasswordForm; |
| } |
| +namespace password_manager { |
| +class TestPasswordStore; |
| +} |
| class ManagePasswordsUIController; |
| @@ -65,20 +68,30 @@ 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. |
| + bool IsSavePromptAvailable() const; |
| + |
| + // Checks if the update prompt is being currently available. |
| + bool IsUpdatePromptAvailable() const; |
| + |
| + // Checks if the save prompt was shown. |
| + bool WasSavePromptShown() const; |
| - // Checks if the update prompt is being currently shown. |
| - bool IsShowingUpdatePrompt() const; |
| + // Checks if the update prompt was shown. |
| + bool WasUpdatePromptShown() 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. |
| + // prompt is no longer available. |
| void AcceptSavePrompt() const; |
| + // Expecting that the prompt is available, opens the prompt and saves the |
| + // password. Checks that the prompt is no longer available. |
| + void OpenAndAcceptSavePrompt() const; |
| + |
| // Expecting that the prompt is shown, update |form| with the password from |
| // observed form. Checks that the prompt is no longer visible afterwards. |
| void AcceptUpdatePrompt(const autofill::PasswordForm& form) const; |
| @@ -162,6 +175,13 @@ class PasswordManagerBrowserTestBase : public InProcessBrowserTest { |
| // Synchronoulsy adds the given host to the list of valid HSTS hosts. |
| void AddHSTSHost(const std::string& host); |
| + // Checks that new credential is stored. For simplicity we assume that |
| + // password store contains only 1 credential. |
|
vasilii
2017/08/02 17:41:11
I don't get from the comment if the method check t
kolos1
2017/08/03 07:58:01
Changed the comment.
|
| + void CheckThatCredentialsStored( |
| + password_manager::TestPasswordStore* password_store, |
|
vasilii
2017/08/02 17:41:11
What's the point to pass the store if it's essenti
kolos1
2017/08/03 07:58:01
I just copied the function from https://cs.chromiu
vasilii
2017/08/03 08:59:15
It wasn't a method of a class.
kolos1
2017/08/03 09:08:03
No, it wasn't. But in PasswordManagerBrowserTestBa
vasilii
2017/08/03 09:55:38
From the point of view of the caller, obviously 2
kolos1
2017/08/04 16:36:16
Done.
|
| + const base::string16& username, |
| + const base::string16& password); |
| + |
| // Accessors |
| // Return the first created tab with a custom ManagePasswordsUIController. |
| content::WebContents* WebContents(); |