Index: chrome/browser/search_engines/template_url_service_sync_unittest.cc |
diff --git a/chrome/browser/search_engines/template_url_service_sync_unittest.cc b/chrome/browser/search_engines/template_url_service_sync_unittest.cc |
index 0b590385f84f634cb99656019335e88bab4b73be..cefdcaa4fee01d4d2c73eaccd2a5e4fe3b002fc2 100644 |
--- a/chrome/browser/search_engines/template_url_service_sync_unittest.cc |
+++ b/chrome/browser/search_engines/template_url_service_sync_unittest.cc |
@@ -9,6 +9,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/chrome_notification_types.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/test/base/testing_pref_service.h" |
@@ -160,11 +161,15 @@ class TemplateURLServiceSyncTest : public testing::Test { |
virtual void SetUp() { |
profile_a_.reset(new TestingProfile); |
+ WebDataServiceFactory::GetInstance()->SetTestingFactory( |
+ profile_a_.get(), TemplateURLServiceSyncTest::BuildNull); |
TemplateURLServiceFactory::GetInstance()->RegisterUserPrefsOnProfile( |
profile_a_.get()); |
model_a_.reset(new TemplateURLService(profile_a_.get())); |
model_a_->Load(); |
profile_b_.reset(new TestingProfile); |
+ WebDataServiceFactory::GetInstance()->SetTestingFactory( |
+ profile_b_.get(), TemplateURLServiceSyncTest::BuildNull); |
TemplateURLServiceFactory::GetInstance()->RegisterUserPrefsOnProfile( |
profile_b_.get()); |
model_b_.reset(new TemplateURLService(profile_b_.get())); |
@@ -295,6 +300,12 @@ class TemplateURLServiceSyncTest : public testing::Test { |
return TemplateURLService::CreateTemplateURLFromSyncData(sync_data); |
} |
+ // Build no service. |
+ static scoped_refptr<RefcountedProfileKeyedService> BuildNull( |
Peter Kasting
2012/03/27 18:18:25
Nit: It seems like this is something that should o
GeorgeY
2012/03/30 19:20:12
Done - removed
|
+ Profile* profile) { |
+ return NULL; |
+ } |
+ |
protected: |
// We keep two TemplateURLServices to test syncing between them. |
scoped_ptr<TestingProfile> profile_a_; |