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

Side by Side Diff: chrome/browser/favicon/favicon_handler_unittest.cc

Issue 1059743003: Remove NOTIFICATION_FAVICON_UPDATED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-active-title
Patch Set: Add DISALLOW_COPY_AND_ASSIGN(FaviconUpdateWatcher) Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/favicon/core/favicon_handler.h" 5 #include "components/favicon/core/favicon_handler.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/favicon/chrome_favicon_client_factory.h" 8 #include "chrome/browser/favicon/chrome_favicon_client_factory.h"
9 #include "chrome/browser/favicon/favicon_service_factory.h" 9 #include "chrome/browser/favicon/favicon_service_factory.h"
10 #include "chrome/browser/favicon/favicon_tab_helper.h" 10 #include "chrome/browser/favicon/favicon_tab_helper.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 update_active_favicon_ = update_active_favicon; 224 update_active_favicon_ = update_active_favicon;
225 if (!update_active_favicon) 225 if (!update_active_favicon)
226 return; 226 return;
227 227
228 ++num_active_favicon_; 228 ++num_active_favicon_;
229 SetActiveFaviconURL(icon_url); 229 SetActiveFaviconURL(icon_url);
230 SetActiveFaviconValidity(true); 230 SetActiveFaviconValidity(true);
231 SetActiveFaviconImage(image); 231 SetActiveFaviconImage(image);
232 } 232 }
233 233
234 void NotifyFaviconUpdated(bool icon_url_changed) override {}
235
234 size_t num_active_favicon() const { return num_active_favicon_; } 236 size_t num_active_favicon() const { return num_active_favicon_; }
235 size_t num_favicon_available() const { return num_favicon_available_; } 237 size_t num_favicon_available() const { return num_favicon_available_; }
236 void ResetNumActiveFavicon() { num_active_favicon_ = 0; } 238 void ResetNumActiveFavicon() { num_active_favicon_ = 0; }
237 void ResetNumFaviconAvailable() { num_favicon_available_ = 0; } 239 void ResetNumFaviconAvailable() { num_favicon_available_ = 0; }
238 240
239 void SetActiveURL(GURL url) { url_ = url; } 241 void SetActiveURL(GURL url) { url_ = url; }
240 242
241 const gfx::Image available_favicon() { return available_image_; } 243 const gfx::Image available_favicon() { return available_image_; }
242 244
243 const GURL available_icon_url() { return available_icon_url_; } 245 const GURL available_icon_url() { return available_icon_url_; }
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1635 EXPECT_EQ(new_favicon_url, driver1.available_icon_url()); 1637 EXPECT_EQ(new_favicon_url, driver1.available_icon_url());
1636 EXPECT_FALSE(driver1.update_active_favicon()); 1638 EXPECT_FALSE(driver1.update_active_favicon());
1637 EXPECT_EQ(3u, driver1.num_favicon_available()); 1639 EXPECT_EQ(3u, driver1.num_favicon_available());
1638 } 1640 }
1639 1641
1640 INSTANTIATE_TEST_CASE_P(FaviconHandlerTestActiveFaviconValidityTrueOrFalse, 1642 INSTANTIATE_TEST_CASE_P(FaviconHandlerTestActiveFaviconValidityTrueOrFalse,
1641 FaviconHandlerActiveFaviconValidityParamTest, 1643 FaviconHandlerActiveFaviconValidityParamTest,
1642 ::testing::Bool()); 1644 ::testing::Bool());
1643 1645
1644 } // namespace. 1646 } // namespace.
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_event_router.cc ('k') | chrome/browser/favicon/favicon_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698