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

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

Issue 6693021: fav icon -> favicon. Pass 5: fav_icon -> favicon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | « chrome/browser/custom_home_pages_table_model.cc ('k') | chrome/browser/history/history.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/expire_history_backend_unittest.cc
diff --git a/chrome/browser/history/expire_history_backend_unittest.cc b/chrome/browser/history/expire_history_backend_unittest.cc
index f08ed8b900c790845731e4fca8493afb5cacffbf..0bcec3b20f8f20276a6a71205dd0c92b218f767e 100644
--- a/chrome/browser/history/expire_history_backend_unittest.cc
+++ b/chrome/browser/history/expire_history_backend_unittest.cc
@@ -201,9 +201,9 @@ void ExpireHistoryTest::AddExampleData(URLID url_ids[3], Time visit_times[4]) {
// Two favicons. The first two URLs will share the same one, while the last
// one will have a unique favicon.
FavIconID favicon1 = thumb_db_->AddFavIcon(GURL("http://favicon/url1"),
- FAV_ICON);
+ FAVICON);
FavIconID favicon2 = thumb_db_->AddFavIcon(GURL("http://favicon/url2"),
- FAV_ICON);
+ FAVICON);
// Three URLs.
URLRow url_row1(GURL("http://www.google.com/1"));
@@ -413,7 +413,7 @@ void ExpireHistoryTest::EnsureURLInfoGone(const URLRow& row) {
TEST_F(ExpireHistoryTest, DeleteFaviconsIfPossible) {
// Add a favicon record.
const GURL favicon_url("http://www.google.com/favicon.ico");
- FavIconID icon_id = thumb_db_->AddFavIcon(favicon_url, FAV_ICON);
+ FavIconID icon_id = thumb_db_->AddFavIcon(favicon_url, FAVICON);
EXPECT_TRUE(icon_id);
EXPECT_TRUE(HasFavIcon(icon_id));
@@ -460,8 +460,8 @@ TEST_F(ExpireHistoryTest, FLAKY_DeleteURLAndFavicon) {
// Verify things are the way we expect with a URL row, favicon, thumbnail.
URLRow last_row;
ASSERT_TRUE(main_db_->GetURLRow(url_ids[2], &last_row));
- FavIconID fav_icon_id = GetFavicon(last_row.url(), FAV_ICON);
- EXPECT_TRUE(HasFavIcon(fav_icon_id));
+ FavIconID favicon_id = GetFavicon(last_row.url(), FAVICON);
+ EXPECT_TRUE(HasFavIcon(favicon_id));
// TODO(sky): fix this, see comment in HasThumbnail.
// EXPECT_TRUE(HasThumbnail(url_ids[2]));
@@ -510,8 +510,8 @@ TEST_F(ExpireHistoryTest, FLAKY_DeleteURLAndFavicon) {
// All the normal data + the favicon should be gone.
EnsureURLInfoGone(last_row);
- EXPECT_FALSE(GetFavicon(last_row.url(), FAV_ICON));
- EXPECT_FALSE(HasFavIcon(fav_icon_id));
+ EXPECT_FALSE(GetFavicon(last_row.url(), FAVICON));
+ EXPECT_FALSE(HasFavIcon(favicon_id));
}
// Deletes a URL with a favicon that other URLs reference, so that the favicon
@@ -524,8 +524,8 @@ TEST_F(ExpireHistoryTest, DeleteURLWithoutFavicon) {
// Verify things are the way we expect with a URL row, favicon, thumbnail.
URLRow last_row;
ASSERT_TRUE(main_db_->GetURLRow(url_ids[1], &last_row));
- FavIconID fav_icon_id = GetFavicon(last_row.url(), FAV_ICON);
- EXPECT_TRUE(HasFavIcon(fav_icon_id));
+ FavIconID favicon_id = GetFavicon(last_row.url(), FAVICON);
+ EXPECT_TRUE(HasFavIcon(favicon_id));
// TODO(sky): fix this, see comment in HasThumbnail.
// EXPECT_TRUE(HasThumbnail(url_ids[1]));
@@ -539,7 +539,7 @@ TEST_F(ExpireHistoryTest, DeleteURLWithoutFavicon) {
// All the normal data + the favicon should be gone.
EnsureURLInfoGone(last_row);
- EXPECT_TRUE(HasFavIcon(fav_icon_id));
+ EXPECT_TRUE(HasFavIcon(favicon_id));
}
// DeleteURL should not delete starred urls.
@@ -562,8 +562,8 @@ TEST_F(ExpireHistoryTest, DontDeleteStarredURL) {
ASSERT_TRUE(main_db_->GetRowForURL(url, &url_row));
// And the favicon should exist.
- FavIconID fav_icon_id = GetFavicon(url_row.url(), FAV_ICON);
- EXPECT_TRUE(HasFavIcon(fav_icon_id));
+ FavIconID favicon_id = GetFavicon(url_row.url(), FAVICON);
+ EXPECT_TRUE(HasFavIcon(favicon_id));
// But there should be no fts.
ASSERT_EQ(0, CountTextMatchesForURL(url_row.url()));
@@ -632,15 +632,15 @@ TEST_F(ExpireHistoryTest, FlushRecentURLsUnstarred) {
EXPECT_EQ(0, temp_row.typed_count());
// Verify that the middle URL's favicon and thumbnail is still there.
- FavIconID fav_icon_id = GetFavicon(url_row1.url(), FAV_ICON);
- EXPECT_TRUE(HasFavIcon(fav_icon_id));
+ FavIconID favicon_id = GetFavicon(url_row1.url(), FAVICON);
+ EXPECT_TRUE(HasFavIcon(favicon_id));
// TODO(sky): fix this, see comment in HasThumbnail.
// EXPECT_TRUE(HasThumbnail(url_row1.id()));
// Verify that the last URL was deleted.
- FavIconID fav_icon_id2 = GetFavicon(url_row2.url(), FAV_ICON);
+ FavIconID favicon_id2 = GetFavicon(url_row2.url(), FAVICON);
EnsureURLInfoGone(url_row2);
- EXPECT_FALSE(HasFavIcon(fav_icon_id2));
+ EXPECT_FALSE(HasFavIcon(favicon_id2));
}
// Expires only a specific URLs more recent than a given time, with no starred
@@ -691,14 +691,14 @@ TEST_F(ExpireHistoryTest, FlushRecentURLsUnstarredRestricted) {
EXPECT_EQ(0, temp_row.typed_count());
// Verify that the middle URL's favicon and thumbnail is still there.
- FavIconID fav_icon_id = GetFavicon(url_row1.url(), FAV_ICON);
- EXPECT_TRUE(HasFavIcon(fav_icon_id));
+ FavIconID favicon_id = GetFavicon(url_row1.url(), FAVICON);
+ EXPECT_TRUE(HasFavIcon(favicon_id));
// TODO(sky): fix this, see comment in HasThumbnail.
// EXPECT_TRUE(HasThumbnail(url_row1.id()));
// Verify that the last URL was not touched.
EXPECT_TRUE(main_db_->GetURLRow(url_ids[2], &temp_row));
- EXPECT_TRUE(HasFavIcon(fav_icon_id));
+ EXPECT_TRUE(HasFavIcon(favicon_id));
// TODO(sky): fix this, see comment in HasThumbnail.
// EXPECT_TRUE(HasThumbnail(url_row2.id()));
}
@@ -740,12 +740,12 @@ TEST_F(ExpireHistoryTest, FlushRecentURLsStarred) {
// that may have been updated since the time threshold. Since the URL still
// exists in history, this should not be a privacy problem, we only update
// the visit counts in this case for consistency anyway.
- FavIconID fav_icon_id = GetFavicon(url_row1.url(), FAV_ICON);
- EXPECT_TRUE(HasFavIcon(fav_icon_id));
+ FavIconID favicon_id = GetFavicon(url_row1.url(), FAVICON);
+ EXPECT_TRUE(HasFavIcon(favicon_id));
// TODO(sky): fix this, see comment in HasThumbnail.
// EXPECT_TRUE(HasThumbnail(new_url_row1.id()));
- fav_icon_id = GetFavicon(url_row1.url(), FAV_ICON);
- EXPECT_TRUE(HasFavIcon(fav_icon_id));
+ favicon_id = GetFavicon(url_row1.url(), FAVICON);
+ EXPECT_TRUE(HasFavIcon(favicon_id));
// TODO(sky): fix this, see comment in HasThumbnail.
// EXPECT_TRUE(HasThumbnail(new_url_row2.id()));
}
« no previous file with comments | « chrome/browser/custom_home_pages_table_model.cc ('k') | chrome/browser/history/history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698