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

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

Issue 152693003: Expose PasswordManagerDriver as a public interface to core Password code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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_form_manager_unittest.cc
diff --git a/chrome/browser/password_manager/password_form_manager_unittest.cc b/chrome/browser/password_manager/password_form_manager_unittest.cc
index 998e84a54fa208b2eb758ea9693b84fbad45982d..6ac3cdb5336f87ccebb73f1313e85fbf2f76acbd 100644
--- a/chrome/browser/password_manager/password_form_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_form_manager_unittest.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/password_manager/password_form_manager.h"
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/password_manager/password_manager_delegate.h"
+#include "chrome/browser/password_manager/password_manager_driver.h"
#include "chrome/browser/password_manager/password_store.h"
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/password_manager/test_password_store.h"
@@ -20,25 +21,35 @@
#include "content/public/test/test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
+class PasswordManagerDriver;
Patrick Dubroy 2014/02/03 13:15:08 Don't think you need this.
blundell 2014/02/03 14:37:59 Done.
+
using autofill::PasswordForm;
using base::ASCIIToUTF16;
using ::testing::Eq;
namespace {
-class TestPasswordManagerDelegate : public PasswordManagerDelegate {
+class TestPasswordManagerDriver : public PasswordManagerDriver {
public:
- explicit TestPasswordManagerDelegate(Profile* profile) : profile_(profile) {}
+ TestPasswordManagerDriver() {}
virtual void FillPasswordForm(
const autofill::PasswordFormFillData& form_data) OVERRIDE {}
+ virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE { return false; }
+};
+
+class TestPasswordManagerDelegate : public PasswordManagerDelegate {
+ public:
+ explicit TestPasswordManagerDelegate(Profile* profile) : profile_(profile) {}
+
virtual void AddSavePasswordInfoBarIfPermitted(
PasswordFormManager* form_to_save) OVERRIDE {}
virtual Profile* GetProfile() OVERRIDE { return profile_; }
- virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE { return false; }
+ virtual PasswordManagerDriver* GetDriver() OVERRIDE { return &driver_; }
private:
Profile* profile_;
+ TestPasswordManagerDriver driver_;
};
class TestPasswordManager : public PasswordManager {

Powered by Google App Engine
This is Rietveld 408576698