| 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 118c858bfad011fab820d72cd485bd01ec74cb19..7d49c0a6a1b1b9704f4be0835f65997c5f4925a3 100644
|
| --- a/ui/gfx/image/image_skia_unittest.cc
|
| +++ b/ui/gfx/image/image_skia_unittest.cc
|
| @@ -173,4 +173,22 @@ TEST(ImageSkiaTest, GetBitmap) {
|
| EXPECT_FALSE(bitmap->isNull());
|
| }
|
|
|
| +TEST(ImageSkiaTest, Equals) {
|
| + // Null images should all be equal.
|
| + ImageSkia image;
|
| + ImageSkia unrelated;
|
| + EXPECT_TRUE(image.Equals(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.Equals(copy));
|
| + EXPECT_FALSE(image.Equals(unrelated));
|
| + EXPECT_FALSE(copy.Equals(unrelated));
|
| +}
|
| +
|
| } // namespace gfx
|
|
|