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

Unified Diff: chrome/browser/favicon/favicon_handler_unittest.cc

Issue 10832128: Convert FaviconStatus::bitmap from SkBitmap to gfx::Image. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tests? Created 8 years, 4 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/favicon/favicon_handler_unittest.cc
diff --git a/chrome/browser/favicon/favicon_handler_unittest.cc b/chrome/browser/favicon/favicon_handler_unittest.cc
index 43eb49f3371359b4a4b65fc6105bebb7dca447c4..bcf438343a04ece407deeea09d289a1124db2a01 100644
--- a/chrome/browser/favicon/favicon_handler_unittest.cc
+++ b/chrome/browser/favicon/favicon_handler_unittest.cc
@@ -13,6 +13,7 @@
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/favicon_size.h"
#include "ui/gfx/image/image.h"
+#include "third_party/skia/include/core/SkBitmap.h"
class TestFaviconHandler;
@@ -419,7 +420,7 @@ TEST_F(FaviconHandlerTest, DownloadFavicon) {
// Verify NavigationEntry.
EXPECT_EQ(icon_url, helper.GetEntry()->GetFavicon().url);
EXPECT_TRUE(helper.GetEntry()->GetFavicon().valid);
- EXPECT_FALSE(helper.GetEntry()->GetFavicon().bitmap.empty());
+ EXPECT_FALSE(helper.GetEntry()->GetFavicon().image.IsEmpty());
}
TEST_F(FaviconHandlerTest, UpdateAndDownloadFavicon) {
@@ -509,7 +510,7 @@ TEST_F(FaviconHandlerTest, UpdateAndDownloadFavicon) {
// Verify NavigationEntry.
EXPECT_EQ(new_icon_url, helper.GetEntry()->GetFavicon().url);
EXPECT_TRUE(helper.GetEntry()->GetFavicon().valid);
- EXPECT_FALSE(helper.GetEntry()->GetFavicon().bitmap.empty());
+ EXPECT_FALSE(helper.GetEntry()->GetFavicon().image.IsEmpty());
}
TEST_F(FaviconHandlerTest, UpdateFavicon) {
@@ -584,7 +585,7 @@ TEST_F(FaviconHandlerTest, UpdateFavicon) {
// Verify the favicon status.
EXPECT_EQ(new_icon_url, helper.GetEntry()->GetFavicon().url);
EXPECT_TRUE(helper.GetEntry()->GetFavicon().valid);
- EXPECT_FALSE(helper.GetEntry()->GetFavicon().bitmap.empty());
+ EXPECT_FALSE(helper.GetEntry()->GetFavicon().image.IsEmpty());
}
TEST_F(FaviconHandlerTest, Download2ndFaviconURLCandidate) {
@@ -892,8 +893,9 @@ TEST_F(FaviconHandlerTest, MultipleFavicon) {
// Verify correct icon size chosen.
EXPECT_EQ(icon_url_preferred1, handler.GetEntry()->GetFavicon().url);
EXPECT_TRUE(handler.GetEntry()->GetFavicon().valid);
- EXPECT_FALSE(handler.GetEntry()->GetFavicon().bitmap.empty());
- EXPECT_EQ(gfx::kFaviconSize, handler.GetEntry()->GetFavicon().bitmap.width());
+ EXPECT_FALSE(handler.GetEntry()->GetFavicon().image.IsEmpty());
+ EXPECT_EQ(gfx::kFaviconSize,
+ handler.GetEntry()->GetFavicon().image.ToSkBitmap()->width());
}
TEST_F(FaviconHandlerTest, FirstFavicon) {
@@ -947,8 +949,9 @@ TEST_F(FaviconHandlerTest, FirstFavicon) {
// Verify correct icon size chosen.
EXPECT_EQ(icon_url_preferred1, handler.GetEntry()->GetFavicon().url);
EXPECT_TRUE(handler.GetEntry()->GetFavicon().valid);
- EXPECT_FALSE(handler.GetEntry()->GetFavicon().bitmap.empty());
- EXPECT_EQ(gfx::kFaviconSize, handler.GetEntry()->GetFavicon().bitmap.width());
+ EXPECT_FALSE(handler.GetEntry()->GetFavicon().image.IsEmpty());
+ EXPECT_EQ(gfx::kFaviconSize,
+ handler.GetEntry()->GetFavicon().image.ToSkBitmap()->width());
}
} // namespace.

Powered by Google App Engine
This is Rietveld 408576698