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

Unified Diff: Source/platform/graphics/BitmapImageTest.cpp

Issue 985583002: Don't cache any SkBitmaps in DeferredImageDecoder (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: done now Created 5 years, 9 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
« no previous file with comments | « Source/platform/graphics/BitmapImage.cpp ('k') | Source/platform/graphics/DeferredImageDecoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/BitmapImageTest.cpp
diff --git a/Source/platform/graphics/BitmapImageTest.cpp b/Source/platform/graphics/BitmapImageTest.cpp
index 1f572720524167efe4edd60b2eee3308d28629e4..4b29ccdd51a5a21ca66e07f393f80ece978b4043 100644
--- a/Source/platform/graphics/BitmapImageTest.cpp
+++ b/Source/platform/graphics/BitmapImageTest.cpp
@@ -73,7 +73,6 @@ public:
void setCurrentFrame(size_t frame) { m_image->m_currentFrame = frame; }
size_t frameDecodedSize(size_t frame) { return m_image->m_frames[frame].m_frameBytes; }
size_t decodedFramesCount() const { return m_image->m_frames.size(); }
- void resetDecoder() { return m_image->resetDecoder(); }
void loadImage(const char* fileName)
{
@@ -188,6 +187,14 @@ TEST_F(BitmapImageTest, isAllDataReceived)
#if USE(QCMSLIB)
+TEST_F(BitmapImageTest, noColorProfile)
+{
+ loadImage("/LayoutTests/fast/images/resources/green.jpg");
+ EXPECT_EQ(1u, decodedFramesCount());
+ EXPECT_EQ(1024u, decodedSize());
+ EXPECT_FALSE(m_image->hasColorProfile());
+}
+
TEST_F(BitmapImageTest, jpegHasColorProfile)
{
loadImage("/LayoutTests/fast/images/resources/icc-v2-gbr.jpg");
@@ -195,13 +202,7 @@ TEST_F(BitmapImageTest, jpegHasColorProfile)
EXPECT_EQ(227700u, decodedSize());
EXPECT_TRUE(m_image->hasColorProfile());
- resetDecoder();
destroyDecodedData(true);
-
- loadImage("/LayoutTests/fast/images/resources/green.jpg");
- EXPECT_EQ(1u, decodedFramesCount());
- EXPECT_EQ(1024u, decodedSize());
- EXPECT_FALSE(m_image->hasColorProfile());
}
TEST_F(BitmapImageTest, pngHasColorProfile)
@@ -211,13 +212,7 @@ TEST_F(BitmapImageTest, pngHasColorProfile)
EXPECT_EQ(65536u, decodedSize());
EXPECT_TRUE(m_image->hasColorProfile());
- resetDecoder();
destroyDecodedData(true);
-
- loadImage("/LayoutTests/fast/images/resources/green.jpg");
- EXPECT_EQ(1u, decodedFramesCount());
- EXPECT_EQ(1024u, decodedSize());
- EXPECT_FALSE(m_image->hasColorProfile());
}
TEST_F(BitmapImageTest, webpHasColorProfile)
@@ -228,12 +223,6 @@ TEST_F(BitmapImageTest, webpHasColorProfile)
EXPECT_TRUE(m_image->hasColorProfile());
destroyDecodedData(true);
- resetDecoder();
-
- loadImage("/LayoutTests/fast/images/resources/test.webp");
- EXPECT_EQ(1u, decodedFramesCount());
- EXPECT_EQ(65536u, decodedSize());
- EXPECT_FALSE(m_image->hasColorProfile());
}
TEST_F(BitmapImageTest, icoHasWrongFrameDimensions)
« no previous file with comments | « Source/platform/graphics/BitmapImage.cpp ('k') | Source/platform/graphics/DeferredImageDecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698