Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2032)

Unified Diff: chrome/browser/password_manager/password_manager_test_base.h

Issue 2915763003: [Password Manager] Show omnibox icon and anchored prompt once user start typing password (Closed)
Patch Set: Introduced |has_generated_password| argument Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..9412fff16da8beea3f287c7ff9f71ce334ff424c 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.
vasilii 2017/08/03 09:55:39 Clarify that it can be both due to both manual fal
kolos1 2017/08/04 16:36:17 Done.
+ bool IsSavePromptAvailable() const;
+
+ // Checks if the update prompt is being currently available.
+ bool IsUpdatePromptAvailable() const;
+
+ // Checks if the save prompt was shown.
vasilii 2017/08/03 09:55:39 was shown automatically?
kolos1 2017/08/04 16:36:17 Done.
+ 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 |password_store| stores only one credential with |username| and
+ // |password|.
+ void CheckThatCredentialsStored(
+ password_manager::TestPasswordStore* password_store,
+ const base::string16& username,
+ const base::string16& password);
+
// Accessors
// Return the first created tab with a custom ManagePasswordsUIController.
content::WebContents* WebContents();

Powered by Google App Engine
This is Rietveld 408576698