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

Unified Diff: Source/platform/graphics/DeferredImageDecoderTest.cpp

Issue 205333004: Deferred image decoding to handle broken GIFs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/platform/graphics/DeferredImageDecoder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/DeferredImageDecoderTest.cpp
diff --git a/Source/platform/graphics/DeferredImageDecoderTest.cpp b/Source/platform/graphics/DeferredImageDecoderTest.cpp
index 757cfc4a409b172d58868588f7df4055ecd308fb..fd20b70f99576212d6d9dd42152ab54c7486955f 100644
--- a/Source/platform/graphics/DeferredImageDecoderTest.cpp
+++ b/Source/platform/graphics/DeferredImageDecoderTest.cpp
@@ -325,4 +325,17 @@ TEST_F(DeferredImageDecoderTest, decodedSize)
EXPECT_EQ(1, m_frameBufferRequestCount);
}
+TEST_F(DeferredImageDecoderTest, smallerFrameCount)
+{
+ m_frameCount = 1;
+ m_lazyDecoder->setData(m_data.get(), false);
+ EXPECT_EQ(m_frameCount, m_lazyDecoder->frameCount());
+ m_frameCount = 2;
+ m_lazyDecoder->setData(m_data.get(), false);
+ EXPECT_EQ(m_frameCount, m_lazyDecoder->frameCount());
+ m_frameCount = 0;
+ m_lazyDecoder->setData(m_data.get(), true);
+ EXPECT_EQ(m_frameCount, m_lazyDecoder->frameCount());
+}
+
} // namespace WebCore
« no previous file with comments | « Source/platform/graphics/DeferredImageDecoder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698