| Index: third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp b/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
|
| index eb5de1a909716bea14bfc45f370fd9f8c6ddd291..010e3cc08bc5bb78a02d5a538ea647f15f71d164 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
|
| @@ -140,6 +140,9 @@ public:
|
| return m_imageObserver->m_lastDecodedSizeChangedDelta;
|
| }
|
|
|
| + PassRefPtr<SharedBuffer> data() { return m_image->data(); }
|
| + PassRefPtr<SharedBuffer> cachedData() { return m_image->cachedData(); }
|
| +
|
| protected:
|
| void SetUp() override
|
| {
|
| @@ -216,6 +219,16 @@ TEST_F(BitmapImageTest, noColorProfile)
|
| EXPECT_FALSE(m_image->hasColorProfile());
|
| }
|
|
|
| +TEST_F(BitmapImageTest, noCachedData)
|
| +{
|
| + loadImage("/LayoutTests/fast/images/resources/green.jpg");
|
| + EXPECT_TRUE(m_image->isAllDataReceived());
|
| + // m_image doesn't have its encoded image data. Instead, its
|
| + // DeferredImageDecoder has it and data() returns this.
|
| + EXPECT_FALSE(cachedData());
|
| + EXPECT_TRUE(data());
|
| +}
|
| +
|
| #if USE(QCMSLIB)
|
|
|
| TEST_F(BitmapImageTest, jpegHasColorProfile)
|
|
|