Index: chrome/test/base/testing_profile.cc |
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc |
index 90bab6b3f4592402c216e505f624fc4d430ebc44..c53e0c10e8b2c4068a94a778af819b2fca9df99a 100644 |
--- a/chrome/test/base/testing_profile.cc |
+++ b/chrome/test/base/testing_profile.cc |
@@ -49,6 +49,7 @@ |
#include "chrome/browser/web_data_service_factory.h" |
#include "chrome/common/chrome_constants.h" |
#include "chrome/common/chrome_switches.h" |
+#include "chrome/common/features.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/common/url_constants.h" |
#include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
@@ -124,6 +125,10 @@ |
#include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h" |
#endif |
+#if BUILDFLAG(ANDROID_JAVA_UI) |
+#include "chrome/browser/android/offline_pages/offline_page_model_factory.h" |
+#endif |
+ |
using base::Time; |
using bookmarks::BookmarkModel; |
using content::BrowserThread; |
@@ -610,6 +615,10 @@ void TestingProfile::CreateBookmarkModel(bool delete_file) { |
base::FilePath path = GetPath().Append(bookmarks::kBookmarksFileName); |
base::DeleteFile(path, false); |
} |
+#if BUILDFLAG(ANDROID_JAVA_UI) |
+ offline_pages::OfflinePageModelFactory::GetInstance()->SetTestingFactory( |
+ this, offline_pages::OfflinePageModelFactory::GetMockFactory()); |
+#endif |
ManagedBookmarkServiceFactory::GetInstance()->SetTestingFactory( |
this, ManagedBookmarkServiceFactory::GetDefaultFactory()); |
// This creates the BookmarkModel. |