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

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

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/autocomplete_history_manager_unittest.cc
diff --git a/components/autofill/core/browser/autocomplete_history_manager_unittest.cc b/components/autofill/core/browser/autocomplete_history_manager_unittest.cc
index 10347adc29c1f01fc38a7be35983d5fb8c01a543..b993775fb0eb628a5dd9228948753b88fa04c2d4 100644
--- a/components/autofill/core/browser/autocomplete_history_manager_unittest.cc
+++ b/components/autofill/core/browser/autocomplete_history_manager_unittest.cc
@@ -6,7 +6,7 @@
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop_proxy.h"
-#include "base/prefs/testing_pref_service.h"
+#include "base/prefs/pref_service.h"
#include "base/run_loop.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
@@ -15,6 +15,7 @@
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
#include "components/autofill/core/browser/autocomplete_history_manager.h"
+#include "components/autofill/core/browser/autofill_common_test.h"
#include "components/autofill/core/browser/autofill_external_delegate.h"
#include "components/autofill/core/browser/autofill_manager.h"
#include "components/autofill/core/browser/test_autofill_driver.h"
@@ -82,12 +83,14 @@ class MockWebDataServiceWrapperCurrent : public MockWebDataServiceWrapperBase {
class MockAutofillManagerDelegate
: public autofill::TestAutofillManagerDelegate {
public:
- MockAutofillManagerDelegate() {}
+ MockAutofillManagerDelegate() :
+ prefs_(test::PrefServiceForTesting().Pass()) {
Ilya Sherman 2013/11/05 18:50:49 Same comments here as in the other test file.
blundell 2013/11/06 10:37:20 Done.
+ }
virtual ~MockAutofillManagerDelegate() {}
- virtual PrefService* GetPrefs() OVERRIDE { return &prefs_; }
+ virtual PrefService* GetPrefs() OVERRIDE { return prefs_.get(); }
private:
- TestingPrefServiceSimple prefs_;
+ scoped_ptr<PrefService> prefs_;
DISALLOW_COPY_AND_ASSIGN(MockAutofillManagerDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698