aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/CodecTest.cpp
diff options
context:
space:
mode:
authorGravatar Leon Scroggins III <scroggo@google.com>2016-12-20 09:49:25 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-20 15:27:27 +0000
commit58f100c02cb9dd14ab63af1152843d3ddfa01e87 (patch)
tree34c8c0fa1ff41d2855b4d410a7e349c095d74d5c /tests/CodecTest.cpp
parent22f4a1fd4859aa75133de37a24b3201cce5d6844 (diff)
Update libwebp to v0.5.2-rc2
This matches the version used by Chromium (crbug.com/675306) and Android (https://android-review.googlesource.com/#/c/316352/). Update our test. In the new version, we successfully decode a subset from incomplete input that we previously did not. Change-Id: I3442bf59ffdf223a723d8aa75f5b9b816b9e9c3c Reviewed-on: https://skia-review.googlesource.com/6320 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'tests/CodecTest.cpp')
-rw-r--r--tests/CodecTest.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp
index 19494b280d..01e9cc4d45 100644
--- a/tests/CodecTest.cpp
+++ b/tests/CodecTest.cpp
@@ -387,7 +387,13 @@ static void check(skiatest::Reporter* r,
&opts, nullptr, nullptr);
if (supportsSubsetDecoding) {
- REPORTER_ASSERT(r, result == expectedResult);
+ if (expectedResult == SkCodec::kSuccess) {
+ REPORTER_ASSERT(r, result == expectedResult);
+ } else {
+ SkASSERT(expectedResult == SkCodec::kIncompleteInput);
+ REPORTER_ASSERT(r, result == SkCodec::kIncompleteInput
+ || result == SkCodec::kSuccess);
+ }
// Webp is the only codec that supports subsets, and it will have modified the subset
// to have even left/top.
REPORTER_ASSERT(r, SkIsAlign2(subset.fLeft) && SkIsAlign2(subset.fTop));