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

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

Issue 1055173003: Remove unused ThumbnailDatabase::UpdateIconMapping() and ThumbnailDatabase::CloneIconMappings() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | chrome/browser/history/thumbnail_database_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 245a30b7f387668e309debda6fc698f889717f57..c6de4d0bcb60eb5e29539f73877e6bba5f613dc7 100644
--- a/chrome/browser/history/history_backend_unittest.cc
+++ b/chrome/browser/history/history_backend_unittest.cc
@@ -2642,49 +2642,6 @@ TEST_F(HistoryBackendTest, UpdateFaviconMappingsAndFetchNoDB) {
EXPECT_TRUE(bitmap_results.empty());
}
-TEST_F(HistoryBackendTest, CloneFaviconIsRestrictedToSameDomain) {
- const GURL url("http://www.google.com/");
- const GURL same_domain_url("http://www.google.com/subdir/index.html");
- const GURL foreign_domain_url("http://www.not-google.com/");
- const GURL icon_url("http://www.google.com/icon.png");
- std::vector<SkBitmap> bitmaps;
- bitmaps.push_back(CreateBitmap(SK_ColorBLUE, kSmallEdgeSize));
-
- // Add a favicon
- backend_->SetFavicons(url, favicon_base::FAVICON, icon_url, bitmaps);
- EXPECT_TRUE(backend_->thumbnail_db_->GetIconMappingsForPageURL(
- url, favicon_base::FAVICON, NULL));
-
- // Validate starting state.
- std::vector<favicon_base::FaviconRawBitmapResult> bitmap_results_out;
- EXPECT_TRUE(backend_->GetFaviconsFromDB(url,
- favicon_base::FAVICON,
- GetEdgeSizesSmallAndLarge(),
- &bitmap_results_out));
- EXPECT_FALSE(backend_->GetFaviconsFromDB(same_domain_url,
- favicon_base::FAVICON,
- GetEdgeSizesSmallAndLarge(),
- &bitmap_results_out));
- EXPECT_FALSE(backend_->GetFaviconsFromDB(foreign_domain_url,
- favicon_base::FAVICON,
- GetEdgeSizesSmallAndLarge(),
- &bitmap_results_out));
-
- // Same-domain cloning should work.
- backend_->CloneFavicons(url, same_domain_url);
- EXPECT_TRUE(backend_->GetFaviconsFromDB(same_domain_url,
- favicon_base::FAVICON,
- GetEdgeSizesSmallAndLarge(),
- &bitmap_results_out));
-
- // Foreign-domain cloning is forbidden.
- backend_->CloneFavicons(url, foreign_domain_url);
- EXPECT_FALSE(backend_->GetFaviconsFromDB(foreign_domain_url,
- favicon_base::FAVICON,
- GetEdgeSizesSmallAndLarge(),
- &bitmap_results_out));
-}
-
TEST_F(HistoryBackendTest, QueryFilteredURLs) {
const char* google = "http://www.google.com/";
const char* yahoo = "http://www.yahoo.com/";
« no previous file with comments | « no previous file | chrome/browser/history/thumbnail_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698