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

Unified Diff: ui/gfx/image/image_skia_unittest.cc

Issue 10824296: Enables HiDPI favicon to be displayed in tab strip on CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
« no previous file with comments | « ui/gfx/image/image_skia.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_skia_unittest.cc
diff --git a/ui/gfx/image/image_skia_unittest.cc b/ui/gfx/image/image_skia_unittest.cc
index 1780254bc493531ca898440ff47f370c83d43a7b..789fbe24359add6f09a1fdef1c56821d049492b9 100644
--- a/ui/gfx/image/image_skia_unittest.cc
+++ b/ui/gfx/image/image_skia_unittest.cc
@@ -196,4 +196,22 @@ TEST(ImageSkiaTest, OperatorBitmapFromSource) {
EXPECT_FALSE(bitmap.isNull());
}
+TEST(ImageSkiaTest, BackedBySameObjectAs) {
+ // Null images should all be backed by the same object (NULL).
+ ImageSkia image;
+ ImageSkia unrelated;
+ EXPECT_TRUE(image.BackedBySameObjectAs(unrelated));
+
+ image.AddRepresentation(gfx::ImageSkiaRep(gfx::Size(10, 10),
+ ui::SCALE_FACTOR_100P));
+ ImageSkia copy = image;
+ copy.AddRepresentation(gfx::ImageSkiaRep(gfx::Size(10, 10),
+ ui::SCALE_FACTOR_200P));
+ unrelated.AddRepresentation(gfx::ImageSkiaRep(gfx::Size(10, 10),
+ ui::SCALE_FACTOR_100P));
+ EXPECT_TRUE(image.BackedBySameObjectAs(copy));
+ EXPECT_FALSE(image.BackedBySameObjectAs(unrelated));
+ EXPECT_FALSE(copy.BackedBySameObjectAs(unrelated));
+}
+
} // namespace gfx
« no previous file with comments | « ui/gfx/image/image_skia.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698