Index: tests/ColorSpaceTest.cpp |
diff --git a/tests/ColorSpaceTest.cpp b/tests/ColorSpaceTest.cpp |
index e9cc14ff45bf65d8db002c9d56955b3cd05209e7..680193e7189c2b8cc7898139768480b1b7f42ac0 100644 |
--- a/tests/ColorSpaceTest.cpp |
+++ b/tests/ColorSpaceTest.cpp |
@@ -313,3 +313,11 @@ DEF_TEST(ColorSpace_Primaries, r) { |
sk_sp<SkColorSpace> space = SkColorSpace::NewRGB(SkColorSpace::kSRGB_RenderTargetGamma, toXYZ); |
REPORTER_ASSERT(r, SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named) == space); |
} |
+ |
+DEF_TEST(ColorSpace_Size, r) { |
+ int memory[30]; |
+ |
+ // NewICC() should fail immediately because the size of the input profile is larger than |
+ // the max size allowed. |
+ REPORTER_ASSERT(r, !SkColorSpace::NewICC(memory, (2 << 22) + 1)); |
+} |