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

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

Issue 1119163003: Save large icons to a new LARGE_ICON type Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: yet more clarifying comments Created 5 years, 7 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 598895bfb17133a4707dd0963ebecbd6e094f867..7f436487ad4aafb843beb7d04040f8ca4b0e44b6 100644
--- a/components/favicon/core/favicon_handler_unittest.cc
+++ b/components/favicon/core/favicon_handler_unittest.cc
@@ -306,9 +306,7 @@ class TestFaviconDriver : public FaviconDriver {
// internals.
class TestFaviconHandler : public FaviconHandler {
public:
- static int GetMaximalIconSize(favicon_base::IconType icon_type) {
- return FaviconHandler::GetMaximalIconSize(icon_type);
- }
+ using FaviconHandler::GetMaximalIconSize;
TestFaviconHandler(const GURL& page_url,
TestFaviconDriver* driver,
@@ -1501,8 +1499,11 @@ TEST_F(FaviconHandlerTest, TestSelectLargestFavicon) {
TEST_F(FaviconHandlerTest, TestFaviconWasScaledAfterDownload) {
const GURL kPageURL("http://www.google.com");
- const int kMaximalSize =
- TestFaviconHandler::GetMaximalIconSize(favicon_base::FAVICON);
+
+ TestFaviconDriver driver1;
+ TestFaviconHandler handler1(kPageURL, &driver1, FaviconHandler::FAVICON,
+ true);
+ const int kMaximalSize = handler1.GetMaximalIconSize(favicon_base::FAVICON);
std::vector<gfx::Size> icon1;
icon1.push_back(gfx::Size(kMaximalSize + 1, kMaximalSize + 1));
@@ -1516,9 +1517,6 @@ TEST_F(FaviconHandlerTest, TestFaviconWasScaledAfterDownload) {
FaviconURL(
GURL("http://www.google.com/c"), favicon_base::FAVICON, icon2)};
- TestFaviconDriver driver1;
- TestFaviconHandler handler1(kPageURL, &driver1, FaviconHandler::FAVICON,
- true);
std::vector<FaviconURL> urls1(kSourceIconURLs,
kSourceIconURLs + arraysize(kSourceIconURLs));
UpdateFaviconURL(&driver1, &handler1, kPageURL, urls1);

Powered by Google App Engine
This is Rietveld 408576698