Chromium Code Reviews| Index: components/ntp_tiles/icon_cacher_impl_unittest.cc |
| diff --git a/components/ntp_tiles/icon_cacher_impl_unittest.cc b/components/ntp_tiles/icon_cacher_impl_unittest.cc |
| index 721aa008f252e6f4006cdae6258aabc273ecbe03..da652774574af7cbe480f5f391786db01303ed89 100644 |
| --- a/components/ntp_tiles/icon_cacher_impl_unittest.cc |
| +++ b/components/ntp_tiles/icon_cacher_impl_unittest.cc |
| @@ -275,6 +275,16 @@ TEST_F(IconCacherTest, LargeNotCachedAndFetchFailed) { |
| EXPECT_FALSE(IconIsCachedFor(site_.url, favicon_base::TOUCH_ICON)); |
| } |
| +TEST_F(IconCacherTest, HandlesEmptyClosuresNicely) { |
|
Marc Treib
2017/03/03 10:29:42
nit: s/Closures/Callbacks/ ?
(The fact that they h
fhorschig
2017/03/03 10:35:26
Done.
|
| + EXPECT_CALL(*image_fetcher_, SetDataUseServiceName(_)); |
| + EXPECT_CALL(*image_fetcher_, SetDesiredImageFrameSize(_)); |
| + ON_CALL(*image_fetcher_, StartOrQueueNetworkRequest(_, _, _)) |
| + .WillByDefault(PassFetch(128, 128)); |
| + IconCacherImpl cacher(&favicon_service_, std::move(image_fetcher_)); |
| + cacher.StartFetch(site_, base::Closure(), base::Closure()); |
| + WaitForTasksToFinish(); |
| +} |
| + |
| TEST_F(IconCacherTest, ProvidesDefaultIconAndSucceedsWithFetching) { |
| // We are not interested which delegate function actually handles the call to |
| // |GetNativeImageNamed| as long as we receive the right image. |