Index: chrome/test/testing_profile.cc |
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc |
index 12e6c1ea9284727d9c2d4629dcb2d82ac9f0e30f..1cfb0a10099da35f00746f0378f0d7ab35f61fed 100644 |
--- a/chrome/test/testing_profile.cc |
+++ b/chrome/test/testing_profile.cc |
@@ -33,6 +33,8 @@ |
#include "chrome/browser/prefs/browser_prefs.h" |
#include "chrome/browser/prefs/testing_pref_store.h" |
#include "chrome/browser/prerender/prerender_manager.h" |
+#include "chrome/browser/printing/print_preview_data_service.h" |
+#include "chrome/browser/printing/print_preview_data_service_factory.h" |
#include "chrome/browser/profiles/profile_dependency_manager.h" |
#include "chrome/browser/search_engines/template_url_fetcher.h" |
#include "chrome/browser/search_engines/template_url_model.h" |
@@ -163,6 +165,8 @@ TestingProfile::TestingProfile() |
&CreateTestDesktopNotificationService); |
DesktopNotificationServiceFactory::GetInstance()->ForceAssociationBetween( |
this, NULL); |
+ PrintPreviewDataServiceFactory::GetInstance()->ForceAssociationBetween(this, |
+ CreateTestPrintPreviewDataService()); |
SessionServiceFactory::GetInstance()->ForceAssociationBetween(this, NULL); |
TabRestoreServiceFactory::GetInstance()->ForceAssociationBetween(this, NULL); |
} |
@@ -488,6 +492,10 @@ void TestingProfile::CreateTestingPrefService() { |
browser::RegisterUserPrefs(prefs_.get()); |
} |
+ProfileKeyedService* TestingProfile::CreateTestPrintPreviewDataService() { |
+ return new PrintPreviewDataService(); |
+} |
+ |
PrefService* TestingProfile::GetPrefs() { |
if (!prefs_.get()) { |
CreateTestingPrefService(); |