Index: components/favicon/core/favicon_handler_unittest.cc |
diff --git a/components/favicon/core/favicon_handler_unittest.cc b/components/favicon/core/favicon_handler_unittest.cc |
index 5a608b8ec5446bff4af2dfe69ff1338178c962a3..6b124fb3282db526ca55a98fe326415d028238e8 100644 |
--- a/components/favicon/core/favicon_handler_unittest.cc |
+++ b/components/favicon/core/favicon_handler_unittest.cc |
@@ -467,6 +467,20 @@ TEST_F(FaviconHandlerTest, DownloadUnknownFaviconInIncognito) { |
ElementsAre(kPageURL, kIconURL16x16)); |
} |
+// Test that the FaviconHandler saves a favicon if the page is bookmarked, even |
+// in incognito. |
+TEST_F(FaviconHandlerTest, DownloadBookmarkedFaviconInIncognito) { |
+ ON_CALL(delegate_, IsOffTheRecord()).WillByDefault(Return(true)); |
+ ON_CALL(delegate_, IsBookmarked(kPageURL)).WillByDefault(Return(true)); |
+ |
+ EXPECT_CALL(favicon_service_, UpdateFaviconMappingsAndFetch(_, _, _, _, _, _)) |
+ .Times(0); |
+ |
+ EXPECT_CALL(favicon_service_, SetFavicons(_, kIconURL16x16, _, _)); |
+ |
pkotwicz
2017/04/05 15:19:42
Can you please add:
EXPECT_THAT(delegate_.downloa
mastiz
2017/04/06 08:17:53
Done. Can you please elaborate why this verificati
pkotwicz
2017/04/06 14:46:02
It is relevant to the test because "the downloaded
mastiz
2017/04/06 14:56:56
Acknowledged, thx.
|
+ RunHandlerWithSimpleFaviconCandidates({kIconURL16x16}); |
+} |
+ |
// Test that the icon is redownloaded if the icon cached for the page URL |
// expired. |
TEST_F(FaviconHandlerTest, RedownloadExpiredPageUrlFavicon) { |