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

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: rebase Created 4 years, 6 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 09d3da1df0e6e61b539272d302ff442864f4e248..819486c8f8bf36be412079d40abaea4736fa58cf 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp
@@ -259,18 +259,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);
@@ -290,7 +290,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;
@@ -303,8 +303,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_FALSE(m_lazyDecoder->frameIsFullyReceivedAtIndex(1));
EXPECT_EQ(20.0f, m_lazyDecoder->frameDurationAtIndex(1));
EXPECT_TRUE(m_actualDecoder);
@@ -313,9 +313,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