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

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

Issue 1929953002: Suppress the autofill password manager after a credential was saved via the API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a comment Created 4 years, 8 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
« no previous file with comments | « chrome/browser/password_manager/password_manager_test_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/password_manager_test_base.cc
diff --git a/chrome/browser/password_manager/password_manager_test_base.cc b/chrome/browser/password_manager/password_manager_test_base.cc
index bdd32c30805a8791188e7087e8533922a8cab090..909c9f9d3d3a6610cb89782b8404a680c90d1fae 100644
--- a/chrome/browser/password_manager/password_manager_test_base.cc
+++ b/chrome/browser/password_manager/password_manager_test_base.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/passwords/passwords_model_delegate.h"
+#include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
@@ -24,6 +24,7 @@
#include "components/password_manager/core/browser/password_manager_test_utils.h"
#include "components/password_manager/core/browser/test_password_store.h"
#include "components/password_manager/core/common/password_manager_features.h"
+#include "content/public/browser/navigation_details.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
@@ -95,6 +96,10 @@ class InfoBarObserver : public PromptObserver,
infobar_service_->RemoveObserver(this);
}
+ void Dismiss() const override {
+ NOTIMPLEMENTED();
+ }
+
private:
// PromptObserver:
bool IsShowingPrompt() const override { return infobar_is_being_shown_; }
@@ -143,6 +148,17 @@ class BubbleObserver : public PromptObserver {
~BubbleObserver() override {}
+ void Dismiss() const override {
+ passwords_model_delegate_->OnBubbleHidden();
+ // Navigate away to reset the state to inactive.
+ static_cast<content::WebContentsObserver*>(
+ static_cast<ManagePasswordsUIController*>(passwords_model_delegate_))
+ ->DidNavigateMainFrame(content::LoadCommittedDetails(),
+ content::FrameNavigateParams());
+ ASSERT_EQ(password_manager::ui::INACTIVE_STATE,
+ passwords_model_delegate_->GetState());
+ }
+
private:
// PromptObserver:
bool IsShowingPrompt() const override {
« no previous file with comments | « chrome/browser/password_manager/password_manager_test_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698