Index: third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
index 131c29af807d31bd6c51a3791869e33014b35a1c..85b6a3f95683390d0f0bfe0b5501feaf3eb16a68 100644 |
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
@@ -353,7 +353,9 @@ TEST_F(DeferredImageDecoderTest, frameOpacity) { |
Vector<char> storage(size); |
SkPixmap pixmap(pixInfo, storage.data(), rowBytes); |
- // Before decoding, the frame is not known to be opaque. |
+ // Before decoding, the frame's alpha is unknown and assumed to be |
+ // transparent. This works well with partial decoding, which will be |
+ // transparent until the full first frame is decoded. |
sk_sp<SkImage> frame = decoder->createFrameAtIndex(0); |
ASSERT_TRUE(frame); |
EXPECT_FALSE(frame->isOpaque()); |
@@ -364,7 +366,9 @@ TEST_F(DeferredImageDecoderTest, frameOpacity) { |
// After decoding, the frame is known to be opaque. |
frame = decoder->createFrameAtIndex(0); |
ASSERT_TRUE(frame); |
- EXPECT_TRUE(frame->isOpaque()); |
+ // The GIF file specifies it is opaque. |
+ // Without the file, we remain at the default: transparent |
+ EXPECT_EQ(testGIF, frame->isOpaque()); |
// Re-generating the opaque-marked frame should not fail. |
EXPECT_TRUE(frame->readPixels(pixmap, 0, 0)); |