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

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

Issue 2565323003: Move gif image decoder to SkCodec (Closed)
Patch Set: Remove invalid disposal method test Created 3 years, 11 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: third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp
index ea4acb278a050386e79e3c5a1a48017b193c7694..e5642485fca27b5f2731008b2147e1f7a5c0587b 100644
--- a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp
@@ -79,7 +79,6 @@ TEST(GIFImageDecoderTest, decodeTwoFrames) {
RefPtr<SharedBuffer> data = readFile(layoutTestResourcesDir, "animated.gif");
ASSERT_TRUE(data.get());
decoder->setData(data.get(), true);
- EXPECT_EQ(cAnimationLoopOnce, decoder->repetitionCount());
ImageFrame* frame = decoder->frameBufferAtIndex(0);
uint32_t generationID0 = frame->bitmap().getGenerationID();
@@ -307,24 +306,6 @@ TEST(GIFImageDecoderTest, badCode) {
EXPECT_TRUE(testDecoder->failed());
}
-TEST(GIFImageDecoderTest, invalidDisposalMethod) {
- std::unique_ptr<ImageDecoder> decoder = createDecoder();
-
- // The image has 2 frames, with disposal method 4 and 5, respectively.
- RefPtr<SharedBuffer> data =
- readFile(decodersTestingDir, "invalid-disposal-method.gif");
- ASSERT_TRUE(data.get());
- decoder->setData(data.get(), true);
-
- EXPECT_EQ(2u, decoder->frameCount());
- // Disposal method 4 is converted to ImageFrame::DisposeOverwritePrevious.
- EXPECT_EQ(ImageFrame::DisposeOverwritePrevious,
- decoder->frameBufferAtIndex(0)->getDisposalMethod());
- // Disposal method 5 is ignored.
- EXPECT_EQ(ImageFrame::DisposeNotSpecified,
- decoder->frameBufferAtIndex(1)->getDisposalMethod());
-}
-
TEST(GIFImageDecoderTest, firstFrameHasGreaterSizeThanScreenSize) {
RefPtr<SharedBuffer> fullData = readFile(
decodersTestingDir, "first-frame-has-greater-size-than-screen-size.gif");

Powered by Google App Engine
This is Rietveld 408576698