Add regression test
authormsarett <msarett@google.com>
Mon, 15 Aug 2016 16:41:59 +0000 (09:41 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 15 Aug 2016 16:42:00 +0000 (09:42 -0700)
Original bug fix was in:
https://codereview.chromium.org/2230163002

BUG:636268
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243143002

Review-Url: https://codereview.chromium.org/2243143002

resources/invalid_images/crbug636268.png [new file with mode: 0644]
tests/ColorSpaceTest.cpp

diff --git a/resources/invalid_images/crbug636268.png b/resources/invalid_images/crbug636268.png
new file mode 100644 (file)
index 0000000..bdb9828
Binary files /dev/null and b/resources/invalid_images/crbug636268.png differ
index 66860da590d12dd4838ce0a714514b3cb18f8d50..1c6ad8a6a75dd4e173fc77d1e461a41a8819ce2e 100644 (file)
@@ -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());
+}