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

Unified Diff: chrome/browser/thumbnails/thumbnail_service_unittest.cc

Issue 53283004: Adding support for forced URLs to TopSites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed GetAllMostVisited. Created 7 years, 1 month 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 | « chrome/browser/thumbnails/thumbnail_service_impl.cc ('k') | chrome/browser/ui/gtk/global_history_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/thumbnails/thumbnail_service_unittest.cc
diff --git a/chrome/browser/thumbnails/thumbnail_service_unittest.cc b/chrome/browser/thumbnails/thumbnail_service_unittest.cc
index 1b128e346334c2ba34e441510dbfac342e206b0b..707d880923169cdd119f67e8380914bab53ef19c 100644
--- a/chrome/browser/thumbnails/thumbnail_service_unittest.cc
+++ b/chrome/browser/thumbnails/thumbnail_service_unittest.cc
@@ -21,9 +21,12 @@ class MockTopSites : public history::TopSitesImpl {
}
// history::TopSitesImpl overrides.
- virtual bool IsFull() OVERRIDE {
+ virtual bool IsNonForcedFull() OVERRIDE {
return known_url_map_.size() >= capacity_;
}
+ virtual bool IsForcedFull() OVERRIDE {
+ return false;
+ }
virtual bool IsKnownURL(const GURL& url) OVERRIDE {
return known_url_map_.find(url.spec()) != known_url_map_.end();
}
@@ -98,7 +101,7 @@ TEST_F(ThumbnailServiceTest, ShouldUpdateThumbnail) {
ThumbnailScore bad_score;
bad_score.time_at_snapshot = base::Time::UnixEpoch(); // Ancient time stamp.
profile.AddKnownURL(kGoodURL, bad_score);
- ASSERT_TRUE(profile.GetTopSites()->IsFull());
+ ASSERT_TRUE(profile.GetTopSites()->IsNonForcedFull());
// Should be false, as the top sites data is full, and the new URL is
// not known.
« no previous file with comments | « chrome/browser/thumbnails/thumbnail_service_impl.cc ('k') | chrome/browser/ui/gtk/global_history_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698