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 f2e8bba792f0732947e61c6f4557214cd86b69a1..bdce01a48a6ec4cbef30f108925c67e788e87843 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" |
@@ -112,6 +113,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_, NULL); |
profile_.CreateHistoryService(true, false); |
profile_.CreateTemplateURLService(); |