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

Unified Diff: third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp

Issue 1962563002: Fix ImageDecoder::frameIsCompleteAtIndex - fully received instead of decoded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extending the scope with naming suggested by @scroggo Created 4 years, 7 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/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 28b31ff209fb98cfdd1606ba7efc242e3f281356..01a39c5b7532f1b0a379eb9167aa285922f02587 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp
@@ -240,18 +240,18 @@ TEST_F(DeferredImageDecoderTest, singleFrameImageLoading)
{
m_status = ImageFrame::FramePartial;
m_lazyDecoder->setData(*m_data, false);
- EXPECT_FALSE(m_lazyDecoder->frameIsCompleteAtIndex(0));
+ EXPECT_FALSE(m_lazyDecoder->frameIsFullyReceivedAtIndex(0));
RefPtr<SkImage> image = m_lazyDecoder->createFrameAtIndex(0);
ASSERT_TRUE(image);
unsigned firstId = image->uniqueID();
- EXPECT_FALSE(m_lazyDecoder->frameIsCompleteAtIndex(0));
+ EXPECT_FALSE(m_lazyDecoder->frameIsFullyReceivedAtIndex(0));
EXPECT_TRUE(m_actualDecoder);
m_status = ImageFrame::FrameComplete;
m_data->append(" ", 1u);
m_lazyDecoder->setData(*m_data, true);
EXPECT_FALSE(m_actualDecoder);
- EXPECT_TRUE(m_lazyDecoder->frameIsCompleteAtIndex(0));
+ EXPECT_TRUE(m_lazyDecoder->frameIsFullyReceivedAtIndex(0));
image = m_lazyDecoder->createFrameAtIndex(0);
ASSERT_TRUE(image);
@@ -271,7 +271,7 @@ TEST_F(DeferredImageDecoderTest, multiFrameImageLoading)
RefPtr<SkImage> image = m_lazyDecoder->createFrameAtIndex(0);
ASSERT_TRUE(image);
unsigned firstId = image->uniqueID();
- EXPECT_FALSE(m_lazyDecoder->frameIsCompleteAtIndex(0));
+ EXPECT_FALSE(m_lazyDecoder->frameIsFullyReceivedAtIndex(0));
EXPECT_EQ(10.0f, m_lazyDecoder->frameDurationAtIndex(0));
m_frameCount = 2;
@@ -284,8 +284,8 @@ TEST_F(DeferredImageDecoderTest, multiFrameImageLoading)
ASSERT_TRUE(image);
unsigned secondId = image->uniqueID();
EXPECT_NE(firstId, secondId);
- EXPECT_TRUE(m_lazyDecoder->frameIsCompleteAtIndex(0));
- EXPECT_TRUE(m_lazyDecoder->frameIsCompleteAtIndex(1));
+ EXPECT_TRUE(m_lazyDecoder->frameIsFullyReceivedAtIndex(0));
+ EXPECT_TRUE(m_lazyDecoder->frameIsFullyReceivedAtIndex(1));
EXPECT_EQ(20.0f, m_lazyDecoder->frameDurationAtIndex(1));
EXPECT_TRUE(m_actualDecoder);
@@ -294,9 +294,9 @@ TEST_F(DeferredImageDecoderTest, multiFrameImageLoading)
m_status = ImageFrame::FrameComplete;
m_lazyDecoder->setData(*m_data, true);
EXPECT_FALSE(m_actualDecoder);
- EXPECT_TRUE(m_lazyDecoder->frameIsCompleteAtIndex(0));
- EXPECT_TRUE(m_lazyDecoder->frameIsCompleteAtIndex(1));
- EXPECT_TRUE(m_lazyDecoder->frameIsCompleteAtIndex(2));
+ EXPECT_TRUE(m_lazyDecoder->frameIsFullyReceivedAtIndex(0));
+ EXPECT_TRUE(m_lazyDecoder->frameIsFullyReceivedAtIndex(1));
+ EXPECT_TRUE(m_lazyDecoder->frameIsFullyReceivedAtIndex(2));
EXPECT_EQ(10.0f, m_lazyDecoder->frameDurationAtIndex(0));
EXPECT_EQ(20.0f, m_lazyDecoder->frameDurationAtIndex(1));
EXPECT_EQ(30.0f, m_lazyDecoder->frameDurationAtIndex(2));

Powered by Google App Engine
This is Rietveld 408576698