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

Unified Diff: chrome/browser/favicon/favicon_handler_unittest.cc

Issue 56143002: Make FaviconService() use Porfile as parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test but break the DEPS Created 7 years, 1 month 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
« no previous file with comments | « chrome/browser/favicon/favicon_handler.cc ('k') | chrome/browser/favicon/favicon_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/favicon/favicon_handler_unittest.cc
diff --git a/chrome/browser/favicon/favicon_handler_unittest.cc b/chrome/browser/favicon/favicon_handler_unittest.cc
index 40d025515a81e25bf61fc515e200b36332065938..08cc59a34689953d36a0c1ce77999239acb04c59 100644
--- a/chrome/browser/favicon/favicon_handler_unittest.cc
+++ b/chrome/browser/favicon/favicon_handler_unittest.cc
@@ -5,6 +5,7 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/favicon/favicon_handler.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
+#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "content/public/browser/favicon_status.h"
@@ -1069,7 +1070,12 @@ TEST_F(FaviconHandlerTest, MultipleFavicons) {
static BrowserContextKeyedService* BuildFaviconService(
content::BrowserContext* profile) {
- return new FaviconService(NULL);
+ return new FaviconService(static_cast<Profile*>(profile));
+}
+
+static BrowserContextKeyedService* BuildHistoryService(
+ content::BrowserContext* profile) {
+ return NULL;
}
// Test that Favicon is not requested repeatedly during the same session if
@@ -1083,6 +1089,10 @@ TEST_F(FaviconHandlerTest, UnableToDownloadFavicon) {
FaviconServiceFactory::GetInstance()->SetTestingFactory(
profile, BuildFaviconService);
+
+ HistoryServiceFactory::GetInstance()->SetTestingFactory(
+ profile, BuildHistoryService);
+
FaviconService* favicon_service = FaviconServiceFactory::GetForProfile(
profile, Profile::IMPLICIT_ACCESS);
« no previous file with comments | « chrome/browser/favicon/favicon_handler.cc ('k') | chrome/browser/favicon/favicon_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698