Index: chrome/browser/history/top_sites_unittest.cc |
diff --git a/chrome/browser/history/top_sites_unittest.cc b/chrome/browser/history/top_sites_unittest.cc |
index a806b8d83fac96d7bdda5c96ab588aca94fcba95..31aea0a3e9d1b0365390f6eaa0f08f1373a33de1 100644 |
--- a/chrome/browser/history/top_sites_unittest.cc |
+++ b/chrome/browser/history/top_sites_unittest.cc |
@@ -1095,9 +1095,16 @@ TEST_F(TopSitesTest, AddTemporaryThumbnail) { |
thumbnail, |
medium_score)); |
- // We shouldn't get the thumnail back though (the url isn't in to sites yet). |
+ // The URL is unknown. |
+ EXPECT_FALSE(top_sites()->IsKnownURL(unknown_url)); |
+ // We should be able to get the thumnail back even if the url isn't in |
+ // to sites yet. |
scoped_refptr<RefCountedBytes> out; |
- EXPECT_FALSE(top_sites()->GetPageThumbnail(unknown_url, &out)); |
+ EXPECT_TRUE(top_sites()->GetPageThumbnail(unknown_url, &out)); |
+ EXPECT_TRUE(ThumbnailEqualsBytes(thumbnail, out.get())); |
+ ThumbnailScore out_score; |
+ EXPECT_TRUE(top_sites()->GetPageThumbnailScore(unknown_url, &out_score)); |
+ EXPECT_TRUE(medium_score.Equals(out_score)); |
std::vector<MostVisitedURL> list; |
@@ -1108,11 +1115,10 @@ TEST_F(TopSitesTest, AddTemporaryThumbnail) { |
mv.redirects.push_back(url1b); |
list.push_back(mv); |
- // Update URLs. This should result in using thumbnail. |
+ // Update URLs. This should result in making the URL known. |
SetTopSites(list); |
- ASSERT_TRUE(top_sites()->GetPageThumbnail(unknown_url, &out)); |
- EXPECT_TRUE(ThumbnailEqualsBytes(thumbnail, out.get())); |
+ EXPECT_TRUE(top_sites()->IsKnownURL(unknown_url)); |
} |
// Tests variations of blacklisting. |