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

Unified Diff: chrome/browser/history/history_backend_unittest.cc

Issue 6283001: Remove TopSites::IsEnabled() as well as related dead code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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: chrome/browser/history/history_backend_unittest.cc
diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc
index e65d36b746e398d79f1daae81d39764f31f83d75..23bda9c2eae76417047521f3e5a8950f819208d8 100644
--- a/chrome/browser/history/history_backend_unittest.cc
+++ b/chrome/browser/history/history_backend_unittest.cc
@@ -415,45 +415,6 @@ TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) {
backend_->thumbnail_db_->GetFavIconIDForFavIconURL(favicon_url1));
}
-TEST_F(HistoryBackendTest, GetPageThumbnailAfterRedirects) {
- ASSERT_TRUE(backend_.get());
- if (history::TopSites::IsEnabled())
- return;
-
- const char* base_url = "http://mail";
- const char* thumbnail_url = "http://mail.google.com";
- const char* first_chain[] = {
- base_url,
- thumbnail_url,
- NULL
- };
- AddRedirectChain(first_chain, 0);
-
- // Add a thumbnail for the end of that redirect chain.
- scoped_ptr<SkBitmap> thumbnail(
- gfx::JPEGCodec::Decode(kGoogleThumbnail, sizeof(kGoogleThumbnail)));
- backend_->SetPageThumbnail(GURL(thumbnail_url), *thumbnail,
- ThumbnailScore(0.25, true, true));
-
- // Write a second URL chain so that if you were to simply check what
- // "http://mail" redirects to, you wouldn't see the URL that has
- // contains the thumbnail.
- const char* second_chain[] = {
- base_url,
- "http://mail.google.com/somewhere/else",
- NULL
- };
- AddRedirectChain(second_chain, 1);
-
- // Now try to get the thumbnail for the base url. It shouldn't be
- // distracted by the second chain and should return the thumbnail
- // attached to thumbnail_url_.
- scoped_refptr<RefCountedBytes> data;
- backend_->GetPageThumbnailDirectly(GURL(base_url), &data);
-
- EXPECT_TRUE(data.get());
-}
-
// Tests a handful of assertions for a navigation with a type of
// KEYWORD_GENERATED.
TEST_F(HistoryBackendTest, KeywordGenerated) {
@@ -616,15 +577,6 @@ TEST_F(HistoryBackendTest, StripUsernamePasswordTest) {
ASSERT_EQ(1U, visits.size());
}
-TEST_F(HistoryBackendTest, DeleteThumbnailsDatabaseTest) {
- if (history::TopSites::IsEnabled())
- return;
-
- EXPECT_TRUE(backend_->thumbnail_db_->NeedsMigrationToTopSites());
- backend_->delegate_->StartTopSitesMigration();
- EXPECT_FALSE(backend_->thumbnail_db_->NeedsMigrationToTopSites());
-}
-
TEST_F(HistoryBackendTest, AddPageVisitSource) {
ASSERT_TRUE(backend_.get());

Powered by Google App Engine
This is Rietveld 408576698