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

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: Created 7 years, 5 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
Index: Source/core/loader/cache/CachedImageTest.cpp
diff --git a/Source/core/loader/cache/CachedImageTest.cpp b/Source/core/loader/cache/CachedImageTest.cpp
index 87814348db3c45450354b40802b5f1cb3e17e687..e5521783b823637764f189ccf2e944e81bed65bb 100644
--- a/Source/core/loader/cache/CachedImageTest.cpp
+++ b/Source/core/loader/cache/CachedImageTest.cpp
@@ -29,58 +29,27 @@
*/
#include "config.h"
-#include "core/loader/cache/CachedImage.h"
+#include "core/loader/cache/CachedImageTest.h"
#include "core/loader/DocumentLoader.h"
#include "core/loader/EmptyClients.h"
-#include "core/loader/cache/CachedImageClient.h"
+#include "core/loader/cache/CachedImage.h"
#include "core/loader/cache/CachedResourceHandle.h"
#include "core/loader/cache/CachedResourceLoader.h"
#include "core/loader/cache/MemoryCache.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(CachedResource*)
- {
- 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()

Powered by Google App Engine
This is Rietveld 408576698