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

Unified Diff: chrome/browser/autofill/autofill_external_delegate_unittest.cc

Issue 10222017: Make password generation switched by a preference in chrome settings rather than a command line fla… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make MockAutofillManager to use the constructor designated for unit tests to avoid dangling pref_ob… Created 8 years, 7 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/app/generated_resources.grd ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_external_delegate_unittest.cc
diff --git a/chrome/browser/autofill/autofill_external_delegate_unittest.cc b/chrome/browser/autofill/autofill_external_delegate_unittest.cc
index 7c6131a7f8a5aa9a53824dee511c7d75eaad8f1d..5a52d61a9ecc97ab74c454a34997a22583593738 100644
--- a/chrome/browser/autofill/autofill_external_delegate_unittest.cc
+++ b/chrome/browser/autofill/autofill_external_delegate_unittest.cc
@@ -56,8 +56,9 @@ class MockAutofillExternalDelegate : public TestAutofillExternalDelegate {
class MockAutofillManager : public AutofillManager {
public:
- explicit MockAutofillManager(TabContentsWrapper* tab_contents)
- : AutofillManager(tab_contents) {}
+ MockAutofillManager(TabContentsWrapper* tab_contents,
+ PersonalDataManager* personal_data)
+ : AutofillManager(tab_contents, personal_data) {}
Ilya Sherman 2012/05/16 18:10:38 nit: Rather than adding a new parameter for |perso
zysxqn 2012/05/16 18:25:03 Done.
MOCK_METHOD4(OnFillAutofillFormData,
void(int query_id,
@@ -79,7 +80,9 @@ class AutofillExternalDelegateUnitTest : public TabContentsWrapperTestHarness {
virtual void SetUp() OVERRIDE {
TabContentsWrapperTestHarness::SetUp();
- autofill_manager_ = new MockAutofillManager(contents_wrapper());
+ // Force to use the constructor designated for unit test, but we don't
+ // really need personal_data in this test so we pass a NULL pointer.
+ autofill_manager_ = new MockAutofillManager(contents_wrapper(), NULL);
external_delegate_.reset(new MockAutofillExternalDelegate(
contents_wrapper(),
autofill_manager_));
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698