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

Unified Diff: third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp

Issue 2393113002: ImageResource: Reset the encoded image size after receiving all data (Closed)
Patch Set: Rename encodedSizeMemoryUsage -> encodedSizeMemoryUsageForTesting Created 4 years, 2 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
Index: third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp b/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
index 00c2c99dcdcfd5fe9fc4039bd927f388303bd5fe..5f02732ac333931d7c0d2fa5fd6196c8e85dd09d 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
@@ -348,7 +348,9 @@ TEST(ImageResourceTest, DecodedDataRemainsWhileHasClients) {
nullptr);
cachedImage->appendData(reinterpret_cast<const char*>(jpeg.data()),
jpeg.size());
+ EXPECT_NE(0u, cachedImage->encodedSizeMemoryUsageForTesting());
cachedImage->finish();
+ EXPECT_EQ(0u, cachedImage->encodedSizeMemoryUsageForTesting());
EXPECT_FALSE(cachedImage->errorOccurred());
ASSERT_TRUE(cachedImage->hasImage());
EXPECT_FALSE(cachedImage->getImage()->isNull());
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.cpp ('k') | third_party/WebKit/Source/core/fetch/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698