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

Side by Side Diff: third_party/WebKit/Source/core/loader/resource/MockImageResourceClient.cpp

Issue 2558033002: Loading: move ImageResource and related classes to core/loader/resource (Closed)
Patch Set: rebase and format Created 4 years 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698