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

Side by Side Diff: third_party/WebKit/Source/core/fetch/MockResourceClients.cpp

Issue 2468883003: [ImageResource 0b] Decouple ImageResourceObserver::imageNotifyFinished() from notifyFinished() (Closed)
Patch Set: Rebase 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698