| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_TEST_BASE_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_TEST_BASE_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_TEST_BASE_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 class PromptObserver { | 60 class PromptObserver { |
| 61 public: | 61 public: |
| 62 virtual ~PromptObserver(); | 62 virtual ~PromptObserver(); |
| 63 | 63 |
| 64 // Checks if the save prompt is being currently shown. | 64 // Checks if the save prompt is being currently shown. |
| 65 virtual bool IsShowingPrompt() const = 0; | 65 virtual bool IsShowingPrompt() const = 0; |
| 66 | 66 |
| 67 // Checks if the update prompt is being currently shown. | 67 // Checks if the update prompt is being currently shown. |
| 68 virtual bool IsShowingUpdatePrompt() const; | 68 virtual bool IsShowingUpdatePrompt() const; |
| 69 | 69 |
| 70 // Dismisses the prompt currently open and moves the controller to the |
| 71 // inactive state. |
| 72 virtual void Dismiss() const = 0; |
| 73 |
| 70 // Expecting that the prompt is shown, saves the password. Checks that the | 74 // Expecting that the prompt is shown, saves the password. Checks that the |
| 71 // prompt is no longer visible afterwards. | 75 // prompt is no longer visible afterwards. |
| 72 void Accept() const; | 76 void Accept() const; |
| 73 | 77 |
| 74 // Expecting that the prompt is shown, update |form| with the password from | 78 // Expecting that the prompt is shown, update |form| with the password from |
| 75 // observed form. Checks that the prompt is no longer visible afterwards. | 79 // observed form. Checks that the prompt is no longer visible afterwards. |
| 76 void AcceptUpdatePrompt(const autofill::PasswordForm& form) const; | 80 void AcceptUpdatePrompt(const autofill::PasswordForm& form) const; |
| 77 | 81 |
| 78 // Chooses the right implementation of PromptObserver and creates an instance | 82 // Chooses the right implementation of PromptObserver and creates an instance |
| 79 // of it. | 83 // of it. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 151 |
| 148 // Accessors | 152 // Accessors |
| 149 content::WebContents* WebContents(); | 153 content::WebContents* WebContents(); |
| 150 content::RenderViewHost* RenderViewHost(); | 154 content::RenderViewHost* RenderViewHost(); |
| 151 | 155 |
| 152 private: | 156 private: |
| 153 DISALLOW_COPY_AND_ASSIGN(PasswordManagerBrowserTestBase); | 157 DISALLOW_COPY_AND_ASSIGN(PasswordManagerBrowserTestBase); |
| 154 }; | 158 }; |
| 155 | 159 |
| 156 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_TEST_BASE_H_ | 160 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_TEST_BASE_H_ |
| OLD | NEW |