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

Unified Diff: Source/core/loader/cache/CachedImageTest.cpp

Issue 19393004: Allow eviction of ImageBitmaps that are created from ImageElements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix for assertion failure. Created 7 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/loader/ImageLoader.cpp ('k') | Source/core/loader/cache/MemoryCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/cache/CachedImageTest.cpp
diff --git a/Source/core/loader/cache/CachedImageTest.cpp b/Source/core/loader/cache/CachedImageTest.cpp
index 0f909c73992db97d82cfc592240458823b6068db..a39768b36130a3af94fe1b067f2eec9974231b5d 100644
--- a/Source/core/loader/cache/CachedImageTest.cpp
+++ b/Source/core/loader/cache/CachedImageTest.cpp
@@ -35,52 +35,23 @@
#include "core/loader/EmptyClients.h"
#include "core/loader/cache/CachedImageClient.h"
#include "core/loader/cache/MemoryCache.h"
+#include "core/loader/cache/MockCachedImageClient.h"
#include "core/loader/cache/ResourceFetcher.h"
#include "core/loader/cache/ResourcePtr.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h"
#include "core/page/Page.h"
#include "core/platform/SharedBuffer.h"
-#include "core/platform/graphics/Image.h"
#include "public/platform/Platform.h"
#include "public/platform/WebThread.h"
#include "public/platform/WebURL.h"
#include "public/platform/WebURLResponse.h"
#include "public/platform/WebUnitTestSupport.h"
-#include <gtest/gtest.h>
using namespace WebCore;
namespace {
-class MockCachedImageClient : public WebCore::CachedImageClient {
-public:
- MockCachedImageClient()
- : m_imageChangedCount(0)
- , m_notifyFinishedCalled(false)
- {
- }
-
- virtual ~MockCachedImageClient() { }
- virtual void imageChanged(CachedImage*, const IntRect*)
- {
- m_imageChangedCount++;
- }
-
- virtual void notifyFinished(Resource*)
- {
- ASSERT_FALSE(m_notifyFinishedCalled);
- m_notifyFinishedCalled = true;
- }
-
- int imageChangedCount() const { return m_imageChangedCount; }
- bool notifyFinishedCalled() const { return m_notifyFinishedCalled; }
-
-private:
- int m_imageChangedCount;
- bool m_notifyFinishedCalled;
-};
-
class QuitTask : public WebKit::WebThread::Task {
public:
virtual void run()
« no previous file with comments | « Source/core/loader/ImageLoader.cpp ('k') | Source/core/loader/cache/MemoryCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698