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

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

Issue 2823093002: Make FaviconService::GetRawFaviconForPageURL() select the best candidate among all the icon types (Closed)
Patch Set: Merge branch 'master' into icon_type Created 3 years, 8 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
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 5e651a646febcaca5d9b28ba8b03e129f4fb5da8..d0fa5e73b738d5c83fa16df3d00415a5c33e346c 100644
--- a/components/favicon/core/favicon_handler_unittest.cc
+++ b/components/favicon/core/favicon_handler_unittest.cc
@@ -261,13 +261,12 @@ class FakeFaviconService {
base::CancelableTaskTracker::TaskId UpdateFaviconMappingsAndFetch(
const GURL& page_url,
- const std::vector<GURL>& icon_urls,
- int icon_types,
+ const GURL& icon_url,
+ favicon_base::IconType icon_type,
mastiz 2017/04/18 08:04:34 This signature change is orthogonal. Can you pleas
pkotwicz 2017/04/20 04:06:19 Done.
int desired_size_in_dip,
const favicon_base::FaviconResultsCallback& callback,
base::CancelableTaskTracker* tracker) {
- CHECK_EQ(1U, icon_urls.size()) << "Multi-icon lookup not implemented";
- return GetFaviconForPageOrIconURL(icon_urls.front(), callback, tracker);
+ return GetFaviconForPageOrIconURL(icon_url, callback, tracker);
}
private:
@@ -398,9 +397,9 @@ TEST_F(FaviconHandlerTest, GetFaviconFromHistory) {
// Test that UpdateFaviconsAndFetch() is called with the appropriate parameters
// when there is data in the database for neither the page URL nor the icon URL.
TEST_F(FaviconHandlerTest, UpdateFaviconMappingsAndFetch) {
- EXPECT_CALL(favicon_service_, UpdateFaviconMappingsAndFetch(
- kPageURL, URLVector{kIconURL16x16}, FAVICON,
- /*desired_size_in_dip=*/16, _, _));
+ EXPECT_CALL(favicon_service_,
+ UpdateFaviconMappingsAndFetch(kPageURL, kIconURL16x16, FAVICON,
+ /*desired_size_in_dip=*/16, _, _));
RunHandlerWithSimpleFaviconCandidates({kIconURL16x16});
}

Powered by Google App Engine
This is Rietveld 408576698