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

Unified Diff: components/autofill/core/browser/autofill_manager_unittest.cc

Issue 52713006: Parameterize the PrefService that PersonalDataManager uses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review, fix unit tests Created 7 years, 1 month 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/autofill/core/browser/autofill_manager_unittest.cc
diff --git a/components/autofill/core/browser/autofill_manager_unittest.cc b/components/autofill/core/browser/autofill_manager_unittest.cc
index 863eb3e08bd08c76a0f6f7d20827b05b89a75eef..ddb6f52af7dc11bbfae857e472f99b1a425e8736 100644
--- a/components/autofill/core/browser/autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -79,6 +79,10 @@ class TestPersonalDataManager : public PersonalDataManager {
set_browser_context(context);
}
+ void SetPrefService(PrefService* pref_service) {
+ set_pref_service(pref_service);
+ }
+
// Factory method for keyed service. PersonalDataManager is NULL for testing.
static BrowserContextKeyedService* Build(content::BrowserContext* profile) {
return NULL;
@@ -697,6 +701,7 @@ class AutofillManagerTest : public ChromeRenderViewHostTestHarness {
autofill::TabAutofillManagerDelegate::CreateForWebContents(web_contents());
personal_data_.SetBrowserContext(profile());
+ personal_data_.SetPrefService(profile()->GetPrefs());
autofill_driver_.reset(new MockAutofillDriver(web_contents()));
autofill_manager_.reset(new TestAutofillManager(
autofill_driver_.get(),

Powered by Google App Engine
This is Rietveld 408576698