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

Unified Diff: components/autofill/core/browser/autofill_common_test.h

Issue 49303005: Parameterize the PrefService that AutofillDownloadManager uses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test, introduce PrefService testing helper 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_common_test.h
diff --git a/components/autofill/core/browser/autofill_common_test.h b/components/autofill/core/browser/autofill_common_test.h
index 8d6a56ff0faca62135a3ed9b0773c79773a4d675..5581428beae69cf4e9859d4ce2e51e7ef83fbea3 100644
--- a/components/autofill/core/browser/autofill_common_test.h
+++ b/components/autofill/core/browser/autofill_common_test.h
@@ -5,6 +5,10 @@
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_COMMON_TEST_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_COMMON_TEST_H_
+#include "base/memory/scoped_ptr.h"
+
+class PrefService;
+
namespace content {
class BrowserContext;
}
@@ -19,6 +23,13 @@ struct FormFieldData;
// Common utilities shared amongst Autofill tests.
namespace test {
+// Returns a PrefService* that can be used for Autofill-related testing in
Ilya Sherman 2013/11/05 18:50:49 nit: "PrefService*" -> "PrefService"
blundell 2013/11/06 10:37:20 Done.
+// contexts where the PrefService would otherwise have to be constructed
+// manually (e.g., in unit tests within Autofill core code). The returned
+// PrefService has had Autofill preferences registered on its associated
+// registry.
+scoped_ptr<PrefService> PrefServiceForTesting();
+
// Provides a quick way to populate a FormField with c-strings.
void CreateTestFormField(const char* label,
const char* name,

Powered by Google App Engine
This is Rietveld 408576698