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

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

Issue 1272413002: Remove useless FaviconHandler::PageChangedSinceFaviconWasRequested() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « components/favicon/core/favicon_handler.cc ('k') | components/favicon/ios/web_favicon_driver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fb5138552ee5ec5879cd515c8f237b2ef3015397..698690397fed7df03b51f7383a3f05ad2fdf2847 100644
--- a/components/favicon/core/favicon_handler_unittest.cc
+++ b/components/favicon/core/favicon_handler_unittest.cc
@@ -247,8 +247,9 @@ class TestFaviconDriver : public FaviconDriver {
image_ = image;
}
- void OnFaviconAvailable(const gfx::Image& image,
+ void OnFaviconAvailable(const GURL& page_url,
const GURL& icon_url,
+ const gfx::Image& image,
bool update_active_favicon) override {
++num_favicon_available_;
available_image_ = image;
@@ -398,7 +399,7 @@ class TestFaviconHandler : public FaviconHandler {
page_url, icon_url, icon_type, bitmap_data, image.Size()));
}
- bool ShouldSaveFavicon(const GURL& url) override { return true; }
+ bool ShouldSaveFavicon() override { return true; }
GURL page_url_;
@@ -502,7 +503,7 @@ class FaviconHandlerTest : public testing::Test {
favicon_handler->FetchFavicon(page_url);
favicon_handler->history_handler()->InvokeCallback();
- favicon_handler->OnUpdateFaviconURL(candidate_icons);
+ favicon_handler->OnUpdateFaviconURL(page_url, candidate_icons);
}
void SetUp() override {
@@ -551,7 +552,7 @@ TEST_F(FaviconHandlerTest, GetFaviconFromHistory) {
std::vector<FaviconURL> urls;
urls.push_back(
FaviconURL(icon_url, favicon_base::FAVICON, std::vector<gfx::Size>()));
- helper.OnUpdateFaviconURL(urls);
+ helper.OnUpdateFaviconURL(page_url, urls);
// Verify FaviconHandler status
EXPECT_EQ(1U, helper.urls().size());
@@ -593,7 +594,7 @@ TEST_F(FaviconHandlerTest, DownloadFavicon) {
std::vector<FaviconURL> urls;
urls.push_back(
FaviconURL(icon_url, favicon_base::FAVICON, std::vector<gfx::Size>()));
- helper.OnUpdateFaviconURL(urls);
+ helper.OnUpdateFaviconURL(page_url, urls);
// Verify FaviconHandler status
EXPECT_EQ(1U, helper.urls().size());
@@ -662,7 +663,7 @@ TEST_F(FaviconHandlerTest, UpdateAndDownloadFavicon) {
std::vector<FaviconURL> urls;
urls.push_back(FaviconURL(
new_icon_url, favicon_base::FAVICON, std::vector<gfx::Size>()));
- helper.OnUpdateFaviconURL(urls);
+ helper.OnUpdateFaviconURL(page_url, urls);
// Verify FaviconHandler status.
EXPECT_EQ(1U, helper.urls().size());
@@ -749,7 +750,7 @@ TEST_F(FaviconHandlerTest, FaviconInHistoryInvalid) {
std::vector<FaviconURL> urls;
urls.push_back(
FaviconURL(icon_url, favicon_base::FAVICON, std::vector<gfx::Size>()));
- helper.OnUpdateFaviconURL(urls);
+ helper.OnUpdateFaviconURL(page_url, urls);
// A download for the favicon should be requested, and we should not do
// another history request.
@@ -810,7 +811,7 @@ TEST_F(FaviconHandlerTest, UpdateFavicon) {
std::vector<FaviconURL> urls;
urls.push_back(FaviconURL(
new_icon_url, favicon_base::FAVICON, std::vector<gfx::Size>()));
- helper.OnUpdateFaviconURL(urls);
+ helper.OnUpdateFaviconURL(page_url, urls);
// Verify FaviconHandler status.
EXPECT_EQ(1U, helper.urls().size());
@@ -879,7 +880,7 @@ TEST_F(FaviconHandlerTest, Download2ndFaviconURLCandidate) {
new_icon_url, favicon_base::TOUCH_ICON, std::vector<gfx::Size>()));
urls.push_back(FaviconURL(
new_icon_url, favicon_base::FAVICON, std::vector<gfx::Size>()));
- helper.OnUpdateFaviconURL(urls);
+ helper.OnUpdateFaviconURL(page_url, urls);
// Verify FaviconHandler status.
EXPECT_EQ(2U, helper.urls().size());
@@ -990,7 +991,7 @@ TEST_F(FaviconHandlerTest, UpdateDuringDownloading) {
new_icon_url, favicon_base::TOUCH_ICON, std::vector<gfx::Size>()));
urls.push_back(FaviconURL(
new_icon_url, favicon_base::FAVICON, std::vector<gfx::Size>()));
- helper.OnUpdateFaviconURL(urls);
+ helper.OnUpdateFaviconURL(page_url, urls);
// Verify FaviconHandler status.
EXPECT_EQ(2U, helper.urls().size());
@@ -1024,7 +1025,7 @@ TEST_F(FaviconHandlerTest, UpdateDuringDownloading) {
std::vector<FaviconURL> latest_urls;
latest_urls.push_back(FaviconURL(
latest_icon_url, favicon_base::TOUCH_ICON, std::vector<gfx::Size>()));
- helper.OnUpdateFaviconURL(latest_urls);
+ helper.OnUpdateFaviconURL(page_url, latest_urls);
EXPECT_EQ(1U, helper.urls().size());
EXPECT_EQ(latest_icon_url, helper.current_candidate()->icon_url);
« no previous file with comments | « components/favicon/core/favicon_handler.cc ('k') | components/favicon/ios/web_favicon_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698