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

Unified Diff: ui/gfx/color_transform_unittest.cc

Issue 2841813002: Converting video color space enums to their corresponding gfx:color space eqvivalent. (Closed)
Patch Set: Fixed ==> "warning C4701: potentially uninitialized local variable 'primary_id' used" Created 3 years, 7 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/color_space.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_transform_unittest.cc
diff --git a/ui/gfx/color_transform_unittest.cc b/ui/gfx/color_transform_unittest.cc
index 289e0012a6cc110d1209bb787e778b842a876caa..d5217a7701270209af43c0f70ec1d65f246fb781 100644
--- a/ui/gfx/color_transform_unittest.cc
+++ b/ui/gfx/color_transform_unittest.cc
@@ -311,33 +311,6 @@ TEST(SimpleColorSpace, GetColorSpace) {
EXPECT_NEAR(tmp.z(), 1.0f, kEpsilon);
}
-TEST(SimpleColorSpace, UnknownVideoToSRGB) {
- // Invalid video spaces should be BT709.
- ColorSpace unknown = gfx::ColorSpace::CreateVideo(
- -1, -1, -1, gfx::ColorSpace::RangeID::LIMITED);
- ColorSpace sRGB = ColorSpace::CreateSRGB();
- std::unique_ptr<ColorTransform> t(ColorTransform::NewColorTransform(
- unknown, sRGB, ColorTransform::Intent::INTENT_PERCEPTUAL));
-
- ColorTransform::TriStim tmp(16.0f / 255.0f, 0.5f, 0.5f);
- t->Transform(&tmp, 1);
- EXPECT_NEAR(tmp.x(), 0.0f, 0.001f);
- EXPECT_NEAR(tmp.y(), 0.0f, 0.001f);
- EXPECT_NEAR(tmp.z(), 0.0f, 0.001f);
-
- tmp = ColorTransform::TriStim(235.0f / 255.0f, 0.5f, 0.5f);
- t->Transform(&tmp, 1);
- EXPECT_NEAR(tmp.x(), 1.0f, 0.001f);
- EXPECT_NEAR(tmp.y(), 1.0f, 0.001f);
- EXPECT_NEAR(tmp.z(), 1.0f, 0.001f);
-
- // Test a blue color
- tmp = ColorTransform::TriStim(128.0f / 255.0f, 240.0f / 255.0f, 0.5f);
- t->Transform(&tmp, 1);
- EXPECT_GT(tmp.z(), tmp.x());
- EXPECT_GT(tmp.z(), tmp.y());
-}
-
TEST(SimpleColorSpace, ToUndefined) {
ColorSpace null;
ColorSpace nonnull = gfx::ColorSpace::CreateSRGB();
« no previous file with comments | « ui/gfx/color_space.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698