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

Unified Diff: components/favicon/core/large_icon_service_unittest.cc

Issue 2856873002: [Thumbnails DB] Allow setting last_requested time when accessing favicons. (Closed)
Patch Set: Peter's comments Created 3 years, 6 months 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 | « components/favicon/core/large_icon_service.cc ('k') | components/favicon/core/test/mock_favicon_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/favicon/core/large_icon_service_unittest.cc
diff --git a/components/favicon/core/large_icon_service_unittest.cc b/components/favicon/core/large_icon_service_unittest.cc
index 7c65371793af32dc9490054b763b591f9baa7709..23a2a67078ba8e81f3000132b864373ea64eaa69 100644
--- a/components/favicon/core/large_icon_service_unittest.cc
+++ b/components/favicon/core/large_icon_service_unittest.cc
@@ -157,8 +157,8 @@ TEST_F(LargeIconServiceTest, ShouldGetFromGoogleServer) {
.WillOnce(PostFetchReply(gfx::Image::CreateFrom1xBitmap(
CreateTestSkBitmap(64, 64, kTestColor))));
EXPECT_CALL(mock_favicon_service_,
- SetLastResortFavicons(GURL(kDummyUrl), kExpectedServerUrl,
- favicon_base::IconType::TOUCH_ICON, _, _))
+ SetOnDemandFavicons(GURL(kDummyUrl), kExpectedServerUrl,
+ favicon_base::IconType::TOUCH_ICON, _, _))
.WillOnce(PostBoolReply(true));
large_icon_service_
@@ -194,8 +194,8 @@ TEST_F(LargeIconServiceTest, ShouldGetFromGoogleServerWithCustomUrl) {
.WillOnce(PostFetchReply(gfx::Image::CreateFrom1xBitmap(
CreateTestSkBitmap(64, 64, kTestColor))));
EXPECT_CALL(mock_favicon_service_,
- SetLastResortFavicons(GURL(kDummyUrl), kExpectedServerUrl,
- favicon_base::IconType::TOUCH_ICON, _, _))
+ SetOnDemandFavicons(GURL(kDummyUrl), kExpectedServerUrl,
+ favicon_base::IconType::TOUCH_ICON, _, _))
.WillOnce(PostBoolReply(true));
large_icon_service_
@@ -224,8 +224,8 @@ TEST_F(LargeIconServiceTest, ShouldGetFromGoogleServerWithOriginalUrl) {
CreateTestSkBitmap(64, 64, kTestColor)),
expected_metadata));
EXPECT_CALL(mock_favicon_service_,
- SetLastResortFavicons(GURL(kDummyUrl), kExpectedOriginalUrl,
- favicon_base::IconType::TOUCH_ICON, _, _))
+ SetOnDemandFavicons(GURL(kDummyUrl), kExpectedOriginalUrl,
+ favicon_base::IconType::TOUCH_ICON, _, _))
.WillOnce(PostBoolReply(true));
base::MockCallback<base::Callback<void(bool success)>> callback;
@@ -252,7 +252,7 @@ TEST_F(LargeIconServiceTest, ShouldTrimQueryParametersForGoogleServer) {
CreateTestSkBitmap(64, 64, kTestColor))));
// Verify that the non-trimmed page URL is used when writing to the database.
EXPECT_CALL(mock_favicon_service_,
- SetLastResortFavicons(_, kExpectedServerUrl, _, _, _));
+ SetOnDemandFavicons(_, kExpectedServerUrl, _, _, _));
large_icon_service_
.GetLargeIconOrFallbackStyleFromGoogleServerSkippingLocalCache(
@@ -311,7 +311,7 @@ TEST_F(LargeIconServiceTest, ShouldReportUnavailableIfFetchFromServerFails) {
"&check_seen=true&size=61&min_size=42&max_size=122"
"&fallback_opts=TYPE,SIZE,URL&url=http://www.example.com/");
- EXPECT_CALL(mock_favicon_service_, SetLastResortFavicons(_, _, _, _, _))
+ EXPECT_CALL(mock_favicon_service_, SetOnDemandFavicons(_, _, _, _, _))
.Times(0);
base::MockCallback<base::Callback<void(bool success)>> callback;
@@ -346,7 +346,7 @@ TEST_F(LargeIconServiceTest, ShouldNotGetFromGoogleServerIfUnavailable) {
EXPECT_CALL(mock_favicon_service_, UnableToDownloadFavicon(_)).Times(0);
EXPECT_CALL(*mock_image_fetcher_, StartOrQueueNetworkRequest(_, _, _, _))
.Times(0);
- EXPECT_CALL(mock_favicon_service_, SetLastResortFavicons(_, _, _, _, _))
+ EXPECT_CALL(mock_favicon_service_, SetOnDemandFavicons(_, _, _, _, _))
.Times(0);
base::MockCallback<base::Callback<void(bool success)>> callback;
« no previous file with comments | « components/favicon/core/large_icon_service.cc ('k') | components/favicon/core/test/mock_favicon_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698