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

Unified Diff: chrome/browser/autocomplete/search_provider_unittest.cc

Issue 9834056: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed unchanged file Created 8 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: chrome/browser/autocomplete/search_provider_unittest.cc
diff --git a/chrome/browser/autocomplete/search_provider_unittest.cc b/chrome/browser/autocomplete/search_provider_unittest.cc
index 0045d6dd5074a95c34637f5b8b796d826b25be4e..d45a8d769637d6f7fc8a0d609a2bffd2afdeabc0 100644
--- a/chrome/browser/autocomplete/search_provider_unittest.cc
+++ b/chrome/browser/autocomplete/search_provider_unittest.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
+#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
@@ -25,6 +26,16 @@
using content::BrowserThread;
+namespace {
+
+// Build no WebDataService.
+static scoped_refptr<RefcountedProfileKeyedService> BuildNull(
Ilya Sherman 2012/03/27 01:01:17 nit: No need to declare this method static, since
GeorgeY 2012/03/30 19:20:12 Removed it.
+ Profile* profile) {
+ return NULL;
+}
+
+} // namespace
+
// The following environment is configured for these tests:
// . The TemplateURL default_t_url_ is set as the default provider.
// . The TemplateURL keyword_t_url_ is added to the TemplateURLService. This
@@ -112,6 +123,8 @@ void SearchProviderTest::SetUp() {
SearchProvider::set_query_suggest_immediately(true);
// We need both the history service and template url model loaded.
+ // TemplateURLService relies on the absence of the WebDataService in tests.
+ WebDataServiceFactory::GetInstance()->SetTestingFactory(&profile_, BuildNull);
profile_.CreateHistoryService(true, false);
profile_.CreateTemplateURLService();
« no previous file with comments | « no previous file | chrome/browser/autocomplete_history_manager.cc » ('j') | chrome/browser/autofill/autofill_metrics_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698