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

Unified Diff: ui/gfx/icc_profile_unittest.cc

Issue 2691213007: color: Don't use QCMS for transforms unless necessary (Closed)
Patch Set: Incorporate review feedback Created 3 years, 10 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') | no next file » | 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 ae04314447042b6c5f4aeb005aa786f41ac50c0a..c4e3db8026b9ca8bfa0faf54bb0392589784562a 100644
--- a/ui/gfx/icc_profile_unittest.cc
+++ b/ui/gfx/icc_profile_unittest.cc
@@ -14,8 +14,10 @@ TEST(ICCProfile, Conversions) {
ICCProfile icc_profile = ICCProfileForTestingColorSpin();
ColorSpace color_space_from_icc_profile = icc_profile.GetColorSpace();
- ICCProfile icc_profile_from_color_space =
- ICCProfile::FromColorSpace(color_space_from_icc_profile);
+ ICCProfile icc_profile_from_color_space;
+ bool result =
+ color_space_from_icc_profile.GetICCProfile(&icc_profile_from_color_space);
+ EXPECT_TRUE(result);
EXPECT_TRUE(icc_profile == icc_profile_from_color_space);
}
@@ -42,10 +44,18 @@ TEST(ICCProfile, Equality) {
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));
+ ICCProfile temp;
+ bool get_icc_result = false;
+
+ get_icc_result = spin_space.GetICCProfile(&temp);
+ EXPECT_TRUE(get_icc_result);
+ EXPECT_TRUE(spin_profile == temp);
+ EXPECT_FALSE(spin_profile != temp);
+
+ get_icc_result = adobe_space.GetICCProfile(&temp);
+ EXPECT_TRUE(get_icc_result);
+ EXPECT_FALSE(spin_profile == temp);
+ EXPECT_TRUE(spin_profile != temp);
EXPECT_TRUE(!!spin_space.ToSkColorSpace());
EXPECT_TRUE(!!adobe_space.ToSkColorSpace());
« no previous file with comments | « ui/gfx/icc_profile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698