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

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

Issue 263253003: Allows arbitrary scale factor in ImageSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 7 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 | ui/gfx/image/image_skia.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_icon_image_unittest.cc
diff --git a/chrome/browser/extensions/extension_icon_image_unittest.cc b/chrome/browser/extensions/extension_icon_image_unittest.cc
index ddf3a836b15ee40d0c28dd193d6ac56f958f9973..a6f0f1934bf2d8e9d10803fb09e4c790159c37cd 100644
--- a/chrome/browser/extensions/extension_icon_image_unittest.cc
+++ b/chrome/browser/extensions/extension_icon_image_unittest.cc
@@ -563,10 +563,12 @@ TEST_F(ExtensionIconImageTest, IconImageDestruction) {
EXPECT_EQ(16, representation.pixel_width());
EXPECT_TRUE(gfx::BitmapsAreEqual(representation.sk_bitmap(), bitmap_16));
- // When requesting another representation, we should get blank image.
+ // When requesting another representation, we should not crash and return some
+ // image of the size. It could be blank or a rescale from the existing 1.0f
+ // icon.
representation = image_skia.GetRepresentation(2.0f);
- EXPECT_TRUE(gfx::BitmapsAreEqual(
- representation.sk_bitmap(),
- CreateBlankBitmapForScale(16, ui::SCALE_FACTOR_200P)));
+ EXPECT_EQ(16, representation.GetWidth());
+ EXPECT_EQ(16, representation.GetHeight());
+ EXPECT_EQ(2.0f, representation.scale());
}
« no previous file with comments | « no previous file | ui/gfx/image/image_skia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698