aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-08-15 09:41:59 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-15 09:42:00 -0700
commitbcae9d3d15d34a59d279c34e187e6101975500c0 (patch)
treee4fbc3ff2b1b03a32ca611e1826635b4d14e5ec8
parent0dafbde31f4485470471dc9885785e2b9ac4b4ca (diff)
Add regression test
-rw-r--r--resources/invalid_images/crbug636268.pngbin0 -> 694999 bytes
-rw-r--r--tests/ColorSpaceTest.cpp7
2 files changed, 7 insertions, 0 deletions
diff --git a/resources/invalid_images/crbug636268.png b/resources/invalid_images/crbug636268.png
new file mode 100644
index 0000000000..bdb982846b
--- /dev/null
+++ b/resources/invalid_images/crbug636268.png
Binary files differ
diff --git a/tests/ColorSpaceTest.cpp b/tests/ColorSpaceTest.cpp
index 66860da590..1c6ad8a6a7 100644
--- a/tests/ColorSpaceTest.cpp
+++ b/tests/ColorSpaceTest.cpp
@@ -259,3 +259,10 @@ DEF_TEST(ColorSpace_Equals, r) {
REPORTER_ASSERT(r, !SkColorSpace::Equals(z30.get(), upperRight.get()));
REPORTER_ASSERT(r, !SkColorSpace::Equals(upperRight.get(), adobe.get()));
}
+
+DEF_TEST(ColorSpace_CRBug, r) {
+ sk_sp<SkData> data = SkData::MakeFromFileName(
+ GetResourcePath("invalid_images/crbug636268.png").c_str());
+ SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(data.get()));
+ REPORTER_ASSERT(r, codec.get());
+}