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

Unified Diff: ui/gfx/icon_util_unittest.cc

Issue 11778073: Add support for getting the 256x256 app icon on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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
« no previous file with comments | « ui/gfx/icon_util.cc ('k') | ui/test/ui_unittests.rc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/icon_util_unittest.cc
===================================================================
--- ui/gfx/icon_util_unittest.cc (revision 176351)
+++ ui/gfx/icon_util_unittest.cc (working copy)
@@ -12,6 +12,7 @@
#include "ui/gfx/icon_util.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/size.h"
+#include "ui/test/ui_unittests_resource.h"
namespace {
@@ -293,3 +294,21 @@
EXPECT_EQ(256, bitmap.width());
EXPECT_EQ(256, bitmap.height());
}
+
+TEST_F(IconUtilTest, TestCreateSkBitmapFromIconResource48x48) {
+ HMODULE module = GetModuleHandle(NULL);
+ scoped_ptr<SkBitmap> bitmap(
+ IconUtil::CreateSkBitmapFromIconResource(module, IDR_MAINFRAME, 48));
+ ASSERT_TRUE(bitmap.get());
+ EXPECT_EQ(48, bitmap->width());
+ EXPECT_EQ(48, bitmap->height());
+}
+
+TEST_F(IconUtilTest, TestCreateSkBitmapFromIconResource256x256) {
+ HMODULE module = GetModuleHandle(NULL);
+ scoped_ptr<SkBitmap> bitmap(
+ IconUtil::CreateSkBitmapFromIconResource(module, IDR_MAINFRAME, 256));
+ ASSERT_TRUE(bitmap.get());
+ EXPECT_EQ(256, bitmap->width());
+ EXPECT_EQ(256, bitmap->height());
+}
« no previous file with comments | « ui/gfx/icon_util.cc ('k') | ui/test/ui_unittests.rc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698