| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/fetch/MockResourceClients.h" | 5 #include "core/fetch/MockResourceClients.h" |
| 6 | 6 |
| 7 #include "core/fetch/ImageResource.h" | 7 #include "core/fetch/ImageResource.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 m_encodedSizeOnLastImageChanged = image->encodedSize(); | 70 m_encodedSizeOnLastImageChanged = image->encodedSize(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void MockImageResourceClient::imageNotifyFinished(ImageResource* image) { | 73 void MockImageResourceClient::imageNotifyFinished(ImageResource* image) { |
| 74 ASSERT_EQ(0, m_imageNotifyFinishedCount); | 74 ASSERT_EQ(0, m_imageNotifyFinishedCount); |
| 75 m_imageNotifyFinishedCount++; | 75 m_imageNotifyFinishedCount++; |
| 76 m_encodedSizeOnImageNotifyFinished = image->encodedSize(); | 76 m_encodedSizeOnImageNotifyFinished = image->encodedSize(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 bool MockImageResourceClient::notifyFinishedCalled() const { | 79 bool MockImageResourceClient::notifyFinishedCalled() const { |
| 80 EXPECT_EQ(m_notifyFinishedCalled ? 1 : 0, m_imageNotifyFinishedCount); | |
| 81 | |
| 82 return m_notifyFinishedCalled; | 80 return m_notifyFinishedCalled; |
| 83 } | 81 } |
| 84 | 82 |
| 85 } // namespace blink | 83 } // namespace blink |
| OLD | NEW |