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

Unified Diff: Source/core/platform/image-decoders/gif/GIFImageDecoderTest.cpp

Issue 23646005: Improve GIF decoding performance (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: bad code initial dictionary Created 7 years, 4 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: Source/core/platform/image-decoders/gif/GIFImageDecoderTest.cpp
diff --git a/Source/core/platform/image-decoders/gif/GIFImageDecoderTest.cpp b/Source/core/platform/image-decoders/gif/GIFImageDecoderTest.cpp
index 090e0d90e3062264bce92ed3317f4b03e6a7a2f8..7daf85a1a7e874857b4ccd3cf473b840c4595f61 100644
--- a/Source/core/platform/image-decoders/gif/GIFImageDecoderTest.cpp
+++ b/Source/core/platform/image-decoders/gif/GIFImageDecoderTest.cpp
@@ -451,3 +451,15 @@ TEST(GIFImageDecoderTest, resumePartialDecodeAfterClearFrameBufferCache)
EXPECT_EQ(ImageFrame::FrameComplete, firstFrame->status());
EXPECT_EQ(baselineHashes[0], hashSkBitmap(firstFrame->getSkBitmap()));
}
+
+
+TEST(GIFImageDecoderTest, badInitialCode)
+{
+ RefPtr<SharedBuffer> testData = readFile("/Source/web/tests/data/bad-initial-code.gif");
Peter Kasting 2013/09/03 18:49:45 Nit: Might want a comment here about what this tes
+ ASSERT_TRUE(testData.get());
+
+ OwnPtr<GIFImageDecoder> testDecoder(createDecoder());
+ testDecoder->setData(testData.get(), true);
+ EXPECT_EQ(1u, testDecoder->frameCount());
+ ASSERT_TRUE(testDecoder->frameBufferAtIndex(0));
+}

Powered by Google App Engine
This is Rietveld 408576698