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 860757042a910114977156c5a2a5cc876d50fdf3..b72b9dfafe2b4d6d11edc1db93f61995f6d4aef3 100644 |
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
@@ -409,4 +409,14 @@ TEST_F(DeferredImageDecoderTest, respectActualDecoderSizeOnCreate) |
EXPECT_EQ(static_cast<size_t>(0), frameBytesCleared); |
} |
+TEST_F(DeferredImageDecoderTest, data) |
+{ |
+ RefPtr<SharedBuffer> originalData = SharedBuffer::create(m_data->data(), m_data->size()); |
+ EXPECT_EQ(originalData->size(), m_data->size()); |
+ m_lazyDecoder->setData(*originalData, false); |
+ RefPtr<SharedBuffer> newData = m_lazyDecoder->data(); |
+ EXPECT_EQ(originalData->size(), newData->size()); |
+ EXPECT_EQ(0, std::memcmp(originalData->data(), newData->data(), newData->size())); |
+} |
+ |
} // namespace blink |