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

Unified Diff: ui/gfx/icc_profile_unittest.cc

Issue 2652503002: Use SkICC in gfx::ICCProfile and gfx::ColorSpace (Closed)
Patch Set: Rebase Created 3 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/icc_profile.cc ('k') | ui/gfx/ipc/color/gfx_param_traits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/icc_profile_unittest.cc
diff --git a/ui/gfx/icc_profile_unittest.cc b/ui/gfx/icc_profile_unittest.cc
index 73fcea94adea6d81593a95b38fc7c21eb57d42e8..16f208bdc94f760ddf579e94fff853839c9edd8c 100644
--- a/ui/gfx/icc_profile_unittest.cc
+++ b/ui/gfx/icc_profile_unittest.cc
@@ -45,4 +45,25 @@ TEST(ICCProfile, SRGB) {
sk_color_space_from_color_space.get()));
}
+TEST(ICCProfile, Equality) {
+ ICCProfile spin_profile = ICCProfileForTestingColorSpin();
+ ICCProfile adobe_profile = ICCProfileForTestingAdobeRGB();
+ EXPECT_TRUE(spin_profile == spin_profile);
+ EXPECT_FALSE(spin_profile != spin_profile);
+ EXPECT_FALSE(spin_profile == adobe_profile);
+ EXPECT_TRUE(spin_profile != adobe_profile);
+
+ gfx::ColorSpace spin_space = spin_profile.GetColorSpace();
+ gfx::ColorSpace adobe_space = adobe_profile.GetColorSpace();
+ EXPECT_TRUE(spin_space == spin_space);
+ EXPECT_FALSE(spin_space != spin_space);
+ EXPECT_FALSE(spin_space == adobe_space);
+ EXPECT_TRUE(spin_space != adobe_space);
+
+ EXPECT_TRUE(spin_profile == ICCProfile::FromColorSpace(spin_space));
+ EXPECT_FALSE(spin_profile != ICCProfile::FromColorSpace(spin_space));
+ EXPECT_FALSE(spin_profile == ICCProfile::FromColorSpace(adobe_space));
+ EXPECT_TRUE(spin_profile != ICCProfile::FromColorSpace(adobe_space));
+}
+
} // namespace gfx
« no previous file with comments | « ui/gfx/icc_profile.cc ('k') | ui/gfx/ipc/color/gfx_param_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698