| 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..9bc3f33aa43977a53bc97bc29960ba296af25126 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_imageChangedNotifyingFinishCount(0)
|
| {
|
| toImageResource(m_resource.get())->addObserver(this);
|
| }
|
| @@ -52,9 +53,20 @@ void MockImageResourceClient::removeAsClient()
|
| MockResourceClient::removeAsClient();
|
| }
|
|
|
| -void MockImageResourceClient::imageChanged(ImageResource*, const IntRect*)
|
| +void MockImageResourceClient::imageChanged(bool isNotifyingFinish, ImageResource*, const IntRect*)
|
| {
|
| + if (isNotifyingFinish) {
|
| + ASSERT_EQ(0, m_imageChangedNotifyingFinishCount);
|
| + m_imageChangedNotifyingFinishCount++;
|
| + }
|
| m_imageChangedCount++;
|
| }
|
|
|
| +bool MockImageResourceClient::notifyFinishedCalled() const
|
| +{
|
| + EXPECT_EQ(m_notifyFinishedCalled ? 1 : 0, m_imageChangedNotifyingFinishCount);
|
| +
|
| + return m_notifyFinishedCalled;
|
| +}
|
| +
|
| } // namespace blink
|
|
|