Chromium Code Reviews| 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 ee396b9dd978e40b22095b132008116c1ede850f..9997cd6ae21cbc9c9b2be9af83ba0bb4cd494eb1 100644 |
| --- a/components/favicon/core/favicon_handler_unittest.cc |
| +++ b/components/favicon/core/favicon_handler_unittest.cc |
| @@ -1210,6 +1210,27 @@ TEST_F(FaviconHandlerTest, TestSortFavicon) { |
| kIconURLWithoutSize1, kIconURLWithoutSize2)); |
| } |
| +TEST_F(FaviconHandlerTest, TestSortTouchIconLargest) { |
| + const GURL kIconURLWithoutSize("http://www.google.com/touchicon-nosize"); |
| + const GURL kIconURL144x144("http://www.google.com/touchicon144x144"); |
| + const GURL kIconURL192x192("http://www.google.com/touchicon192x192"); |
|
noyau (Ping after 24h)
2017/07/04 15:21:00
I'm trying to decipher these unit tests and at the
mastiz
2017/07/04 15:36:38
I can totally imagine the pain of parsing this big
noyau (Ping after 24h)
2017/07/05 07:28:32
Agreed about outside of this patch.
|
| + |
| + const std::vector<favicon::FaviconURL> kSourceIconURLs{ |
| + FaviconURL(kIconURLWithoutSize, TOUCH_ICON, kEmptySizes), |
| + FaviconURL(kIconURL144x144, TOUCH_ICON, |
| + SizeVector(1U, gfx::Size(144, 144))), |
| + FaviconURL(kIconURL192x192, TOUCH_ICON, |
| + SizeVector(1U, gfx::Size(192, 192))), |
| + }; |
| + |
| + std::unique_ptr<FaviconHandler> handler = RunHandlerWithCandidates( |
| + FaviconDriverObserver::TOUCH_LARGEST, kSourceIconURLs); |
| + |
| + EXPECT_THAT( |
| + handler->GetIconURLs(), |
| + ElementsAre(kIconURL192x192, kIconURL144x144, kIconURLWithoutSize)); |
| +} |
| + |
| TEST_F(FaviconHandlerTest, TestDownloadLargestFavicon) { |
| // Names represent the bitmap sizes per icon. |
| const GURL kIconURL1024_512("http://www.google.com/a"); |