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

Unified Diff: trunk/src/ui/gfx/image/image_unittest.cc

Issue 347983004: Revert 278589 "Use ImageSkiaSource to create ImageSkia from Imag..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 | « trunk/src/ui/gfx/image/image.cc ('k') | trunk/src/ui/gfx/image/image_unittest_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ui/gfx/image/image_unittest.cc
===================================================================
--- trunk/src/ui/gfx/image/image_unittest.cc (revision 278650)
+++ trunk/src/ui/gfx/image/image_unittest.cc (working copy)
@@ -243,22 +243,12 @@
scales.push_back(1.0f);
scales.push_back(2.0f);
gfx::ImageSkia image_skia = image.AsImageSkia();
+ EXPECT_TRUE(gt::ImageSkiaStructureMatches(image_skia, kSize1x, kSize1x,
+ scales));
EXPECT_TRUE(gt::IsEqual(bytes1x,
image_skia.GetRepresentation(1.0f).sk_bitmap()));
EXPECT_TRUE(gt::IsEqual(bytes2x,
image_skia.GetRepresentation(2.0f).sk_bitmap()));
- EXPECT_TRUE(gt::ImageSkiaStructureMatches(image_skia, kSize1x, kSize1x,
- scales));
-
- gfx::ImageSkiaRep rep_1_6x = image_skia.GetRepresentation(1.6f);
- ASSERT_FALSE(rep_1_6x.is_null());
- ASSERT_EQ(1.6f, rep_1_6x.scale());
- EXPECT_EQ("40x40", rep_1_6x.pixel_size().ToString());
-
- gfx::ImageSkiaRep rep_0_8x = image_skia.GetRepresentation(0.8f);
- ASSERT_FALSE(rep_0_8x.is_null());
- ASSERT_EQ(0.8f, rep_0_8x.scale());
- EXPECT_EQ("20x20", rep_0_8x.pixel_size().ToString());
}
TEST_F(ImageTest, MultiResolutionPNGToPlatform) {
« no previous file with comments | « trunk/src/ui/gfx/image/image.cc ('k') | trunk/src/ui/gfx/image/image_unittest_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698