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

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: Rebase 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..171cd042a0dd3e3684d3287baf69a51ebff8dc39 100644
--- a/chrome/browser/password_manager/password_manager_test_base.h
+++ b/chrome/browser/password_manager/password_manager_test_base.h
@@ -65,18 +65,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 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.
+ // |web_contents| must be the custom one returned by
+ // PasswordManagerBrowserTestBase.
+ bool IsSavePromptShownAutomatically() const;
+
+ // Checks if the update prompt was shown automatically.
+ // |web_contents| must be the custom one returned by
+ // PasswordManagerBrowserTestBase.
+ 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 +109,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 +179,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();

Powered by Google App Engine
This is Rietveld 408576698