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

Unified Diff: third_party/WebKit/Source/core/animation/CompositorAnimationsTestHelper.h

Issue 1464493002: Revert of More regular Platform implementations in unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/animation/CompositorAnimationsTestHelper.h
diff --git a/third_party/WebKit/Source/core/animation/CompositorAnimationsTestHelper.h b/third_party/WebKit/Source/core/animation/CompositorAnimationsTestHelper.h
index 687fa04ed948ab29c0e8d98aa555cbcd84ebf3e5..384f4cc23c4d4884e742ca40a2c13bd885a8dc19 100644
--- a/third_party/WebKit/Source/core/animation/CompositorAnimationsTestHelper.h
+++ b/third_party/WebKit/Source/core/animation/CompositorAnimationsTestHelper.h
@@ -26,7 +26,7 @@
#define CompositorAnimationsTestHelper_h
#include "core/animation/CompositorAnimations.h"
-#include "platform/testing/TestingPlatformSupport.h"
+#include "public/platform/Platform.h"
#include "public/platform/WebCompositorAnimationPlayer.h"
#include "public/platform/WebCompositorAnimationTimeline.h"
#include "public/platform/WebCompositorSupport.h"
@@ -152,13 +152,31 @@
};
private:
- class PlatformProxy : public TestingPlatformSupport {
+ class PlatformProxy : public Platform {
public:
- explicit PlatformProxy(WebCompositorSupportMock** compositor) : m_compositor(compositor) { }
+ PlatformProxy(WebCompositorSupportMock** compositor) : m_platform(Platform::current()), m_compositor(compositor) { }
+
+ ~PlatformProxy()
+ {
+ blink::Platform::initialize(m_platform);
+ }
+
+ virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t length) { ASSERT_NOT_REACHED(); }
+ const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName) override
+ {
+ static const unsigned char tracingIsDisabled = 0;
+ return &tracingIsDisabled;
+ }
+
+ WebThread* currentThread() override
+ {
+ return m_platform->currentThread();
+ }
+
private:
+ blink::Platform* m_platform; // Not owned.
+ WebCompositorSupportMock** m_compositor;
WebCompositorSupport* compositorSupport() override { return *m_compositor; }
-
- WebCompositorSupportMock** m_compositor;
};
WebCompositorSupportMock* m_mockCompositor;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698