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

Unified Diff: components/password_manager/core/browser/password_generation_manager_unittest.cc

Issue 184103016: Autofill: Refactoring to support fetching password after a username is selected (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address gcasto's comments. Created 6 years, 9 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: components/password_manager/core/browser/password_generation_manager_unittest.cc
diff --git a/components/password_manager/core/browser/password_generation_manager_unittest.cc b/components/password_manager/core/browser/password_generation_manager_unittest.cc
index 70f432f8512ec58bae3396145e1efa53967246af..ac6c837a86321c4b92b1392a1e456c77105c3277 100644
--- a/components/password_manager/core/browser/password_generation_manager_unittest.cc
+++ b/components/password_manager/core/browser/password_generation_manager_unittest.cc
@@ -13,6 +13,7 @@
#include "components/autofill/core/browser/form_structure.h"
#include "components/autofill/core/common/form_data.h"
#include "components/autofill/core/common/form_field_data.h"
+#include "components/password_manager/core/browser/password_autofill_manager.h"
#include "components/password_manager/core/browser/password_generation_manager.h"
#include "components/password_manager/core/browser/password_manager.h"
#include "components/password_manager/core/browser/password_manager_client.h"
@@ -29,6 +30,7 @@ class TestPasswordManagerDriver : public PasswordManagerDriver {
TestPasswordManagerDriver(PasswordManagerClient* client)
: password_manager_(client),
password_generation_manager_(client),
+ password_autofill_manager_(client, NULL),
is_off_the_record_(false) {}
virtual ~TestPasswordManagerDriver() {}
@@ -46,6 +48,9 @@ class TestPasswordManagerDriver : public PasswordManagerDriver {
virtual autofill::AutofillManager* GetAutofillManager() OVERRIDE {
return NULL;
}
+ virtual PasswordAutofillManager* GetPasswordAutofillManager() OVERRIDE {
+ return &password_autofill_manager_;
+ }
virtual void AllowPasswordGenerationForForm(autofill::PasswordForm* form)
OVERRIDE {}
virtual void AccountCreationFormsFound(
@@ -53,6 +58,10 @@ class TestPasswordManagerDriver : public PasswordManagerDriver {
found_account_creation_forms_.insert(
found_account_creation_forms_.begin(), forms.begin(), forms.end());
}
+ virtual void AcceptPasswordAutofillSuggestion(
+ const base::string16& username,
+ const base::string16& password) OVERRIDE {
+ }
Ilya Sherman 2014/03/18 00:14:27 nit: Do you need to add these methods? It doesn't
Patrick Dubroy 2014/03/28 15:44:22 See previous comment.
const std::vector<autofill::FormData>& GetFoundAccountCreationForms() {
return found_account_creation_forms_;
@@ -64,6 +73,7 @@ class TestPasswordManagerDriver : public PasswordManagerDriver {
private:
PasswordManager password_manager_;
PasswordGenerationManager password_generation_manager_;
+ PasswordAutofillManager password_autofill_manager_;
std::vector<autofill::FormData> found_account_creation_forms_;
bool is_off_the_record_;
};

Powered by Google App Engine
This is Rietveld 408576698