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

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

Issue 1456873003: More regular Platform implementations in unit tests (reland.) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: have GN disable c4267 also 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 384f4cc23c4d4884e742ca40a2c13bd885a8dc19..687fa04ed948ab29c0e8d98aa555cbcd84ebf3e5 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 "public/platform/Platform.h"
+#include "platform/testing/TestingPlatformSupport.h"
#include "public/platform/WebCompositorAnimationPlayer.h"
#include "public/platform/WebCompositorAnimationTimeline.h"
#include "public/platform/WebCompositorSupport.h"
@@ -152,31 +152,13 @@ public:
};
private:
- class PlatformProxy : public Platform {
+ class PlatformProxy : public TestingPlatformSupport {
public:
- 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();
- }
-
+ explicit PlatformProxy(WebCompositorSupportMock** compositor) : m_compositor(compositor) { }
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