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

Unified Diff: chrome/browser/extensions/bookmark_app_helper_unittest.cc

Issue 246333006: Implement new bookmark app icon generation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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/extensions/bookmark_app_helper_unittest.cc
diff --git a/chrome/browser/extensions/bookmark_app_helper_unittest.cc b/chrome/browser/extensions/bookmark_app_helper_unittest.cc
index 4c4ef21cd531f294ec01930cc8d3d285e224c3f5..79fc38f0048c1bc8383881f831329f86e29986bc 100644
--- a/chrome/browser/extensions/bookmark_app_helper_unittest.cc
+++ b/chrome/browser/extensions/bookmark_app_helper_unittest.cc
@@ -227,30 +227,6 @@ TEST_F(BookmarkAppHelperTest, ConstrainBitmapsToSizes) {
}
}
-TEST_F(BookmarkAppHelperTest, GenerateIcons) {
- {
- // The 32x32 icon should be generated from the 16x16 icon.
- std::map<int, SkBitmap> bitmaps;
- bitmaps[16] = CreateSquareBitmapWithColor(16, SK_ColorRED);
- BookmarkAppHelper::GenerateContainerIcon(&bitmaps, 32);
- EXPECT_EQ(1u, bitmaps.count(32));
- EXPECT_EQ(32, bitmaps[32].width());
- }
- {
- // The 32x32 icon should not be generated because no smaller icon exists.
- std::map<int, SkBitmap> bitmaps;
- bitmaps[48] = CreateSquareBitmapWithColor(48, SK_ColorRED);
- BookmarkAppHelper::GenerateContainerIcon(&bitmaps, 32);
- EXPECT_EQ(0u, bitmaps.count(32));
- }
- {
- // The 32x32 icon should not be generated with no base icons.
- std::map<int, SkBitmap> bitmaps;
- BookmarkAppHelper::GenerateContainerIcon(&bitmaps, 32);
- EXPECT_EQ(0u, bitmaps.count(32));
- }
-}
-
TEST_F(BookmarkAppHelperTest, IsValidBookmarkAppUrl) {
EXPECT_TRUE(IsValidBookmarkAppUrl(GURL("https://www.chromium.org")));
EXPECT_TRUE(IsValidBookmarkAppUrl(GURL("http://www.chromium.org/path")));

Powered by Google App Engine
This is Rietveld 408576698