OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/MockImageResourceClient.h" | 5 #include "core/loader/resource/MockImageResourceClient.h" |
6 | 6 |
7 #include "core/fetch/ImageResource.h" | 7 #include "core/loader/resource/ImageResource.h" |
8 #include "core/fetch/ImageResourceContent.h" | 8 #include "core/loader/resource/ImageResourceContent.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 MockImageResourceClient::MockImageResourceClient(ImageResource* resource) | 13 MockImageResourceClient::MockImageResourceClient(ImageResource* resource) |
14 : MockResourceClient(resource), | 14 : MockResourceClient(resource), |
15 m_imageChangedCount(0), | 15 m_imageChangedCount(0), |
16 m_encodedSizeOnLastImageChanged(0), | 16 m_encodedSizeOnLastImageChanged(0), |
17 m_imageNotifyFinishedCount(0), | 17 m_imageNotifyFinishedCount(0), |
18 m_encodedSizeOnImageNotifyFinished(0) { | 18 m_encodedSizeOnImageNotifyFinished(0) { |
(...skipping 23 matching lines...) Expand all Loading... |
42 ASSERT_EQ(0, m_imageNotifyFinishedCount); | 42 ASSERT_EQ(0, m_imageNotifyFinishedCount); |
43 m_imageNotifyFinishedCount++; | 43 m_imageNotifyFinishedCount++; |
44 m_encodedSizeOnImageNotifyFinished = m_resource->encodedSize(); | 44 m_encodedSizeOnImageNotifyFinished = m_resource->encodedSize(); |
45 } | 45 } |
46 | 46 |
47 bool MockImageResourceClient::notifyFinishedCalled() const { | 47 bool MockImageResourceClient::notifyFinishedCalled() const { |
48 return m_notifyFinishedCalled; | 48 return m_notifyFinishedCalled; |
49 } | 49 } |
50 | 50 |
51 } // namespace blink | 51 } // namespace blink |
OLD | NEW |