Chromium Code Reviews| Index: third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp |
| diff --git a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp |
| index db35162328d60184776e5b5dd62b9202428afc00..aba6aadee56b5443b197e0549ac9da8e8bafe3a6 100644 |
| --- a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp |
| +++ b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp |
| @@ -299,4 +299,18 @@ TEST(JPEGImageDecoderTest, mergeBuffer) { |
| testMergeBuffer(&createDecoder, jpegFile); |
| } |
| +// This tests decoding a JPEG with many progressive scans. Decoding should |
|
msarett
2016/11/07 15:42:28
This test takes about 16ms to run.
|
| +// fail, but not hang (crbug.com/642462). |
| +TEST(JPEGImageDecoderTest, manyProgressiveScans) { |
| + RefPtr<SharedBuffer> testData = |
| + readFile(decodersTestingDir, "many-progressive-scans.jpg"); |
| + ASSERT_TRUE(testData.get()); |
| + |
| + std::unique_ptr<ImageDecoder> testDecoder = createDecoder(); |
| + testDecoder->setData(testData.get(), true); |
| + EXPECT_EQ(1u, testDecoder->frameCount()); |
| + ASSERT_TRUE(testDecoder->frameBufferAtIndex(0)); |
| + EXPECT_TRUE(testDecoder->failed()); |
| +} |
| + |
| } // namespace blink |