| Index: third_party/WebKit/Source/core/fetch/MockResourceClients.cpp
|
| diff --git a/third_party/WebKit/Source/core/fetch/MockResourceClients.cpp b/third_party/WebKit/Source/core/fetch/MockResourceClients.cpp
|
| index 1894dab1aa6f2e8d149d53199923d44486ea26e3..f735e582ac7f7226d8d7e7999c61073d8a22f4ea 100644
|
| --- a/third_party/WebKit/Source/core/fetch/MockResourceClients.cpp
|
| +++ b/third_party/WebKit/Source/core/fetch/MockResourceClients.cpp
|
| @@ -36,6 +36,7 @@ void MockResourceClient::removeAsClient()
|
| MockImageResourceClient::MockImageResourceClient(PassRefPtrWillBeRawPtr<ImageResource> resource)
|
| : MockResourceClient(resource)
|
| , m_imageChangedCount(0)
|
| + , m_imageNotifyFinishedCount(0)
|
| {
|
| toImageResource(m_resource.get())->addObserver(this);
|
| }
|
| @@ -57,4 +58,17 @@ void MockImageResourceClient::imageChanged(ImageResource*, const IntRect*)
|
| m_imageChangedCount++;
|
| }
|
|
|
| +void MockImageResourceClient::imageNotifyFinished(ImageResource*)
|
| +{
|
| + ASSERT_EQ(0, m_imageNotifyFinishedCount);
|
| + m_imageNotifyFinishedCount++;
|
| +}
|
| +
|
| +bool MockImageResourceClient::notifyFinishedCalled() const
|
| +{
|
| + EXPECT_EQ(m_notifyFinishedCalled ? 1 : 0, m_imageNotifyFinishedCount);
|
| +
|
| + return m_notifyFinishedCalled;
|
| +}
|
| +
|
| } // namespace blink
|
|
|