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

Unified Diff: tests/CodecTest.cpp

Issue 2447863002: Report repetition count in SkCodec (Closed)
Patch Set: Return a bool, with multiple out parameters Created 4 years, 2 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
Index: tests/CodecTest.cpp
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp
index 738e0cc91dd7e5da9128474718d414487e581415..38e78944bf0e5e7e9a7eada1f67a98d758d32617 100644
--- a/tests/CodecTest.cpp
+++ b/tests/CodecTest.cpp
@@ -1278,9 +1278,14 @@ DEF_TEST(Codec_skipFullParse, r) {
REPORTER_ASSERT(r, finalPosition > positionAfterThirdFrame);
// There may be more data in the stream.
- auto frameInfo = codec->getFrameInfo();
- REPORTER_ASSERT(r, frameInfo.size() == 4);
- REPORTER_ASSERT(r, stream->getPosition() >= finalPosition);
+ std::vector<SkCodec::FrameInfo> frameInfo;
+ const bool animated = codec->getFrameInfo(&frameInfo, nullptr);
+ if (animated) {
+ REPORTER_ASSERT(r, frameInfo.size() == 4);
+ REPORTER_ASSERT(r, stream->getPosition() >= finalPosition);
+ } else {
+ ERRORF(r, "Image should be animated!\n");
+ }
}
// Only rewinds up to a limit.

Powered by Google App Engine
This is Rietveld 408576698