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

Unified Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp

Issue 1956893003: compositor-worker: Add CompositorProxyClient worker client of CompositorWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use local root frame and remove unneeded includes. Created 4 years, 7 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: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
index dd55032545cc9bbd9d40510acd53574475899928..b92d3eecae13f9d50808671d8bc41d79e20b9486 100644
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
@@ -6,6 +6,7 @@
#include "bindings/core/v8/ScriptSourceCode.h"
#include "bindings/core/v8/V8GCController.h"
+#include "core/dom/CompositorProxyClient.h"
#include "core/inspector/ConsoleMessage.h"
#include "core/testing/DummyPageHolder.h"
#include "core/workers/InProcessWorkerObjectProxy.h"
@@ -57,6 +58,17 @@ private:
Persistent<ExecutionContext> m_executionContext;
};
+class TestCompositorProxyClient
+ : public GarbageCollected<TestCompositorProxyClient>
+ , public CompositorProxyClient {
+ USING_GARBAGE_COLLECTED_MIXIN(TestCompositorProxyClient);
+public:
+ TestCompositorProxyClient() {}
+
+ void setGlobalScope(WorkerGlobalScope*) override {}
+ void runAnimationFrameCallbacks() override {}
+};
+
class CompositorWorkerTestPlatform : public TestingPlatformSupport {
public:
CompositorWorkerTestPlatform()
@@ -97,7 +109,8 @@ public:
PassOwnPtr<CompositorWorkerThread> createCompositorWorker()
{
OwnPtr<CompositorWorkerThread> workerThread = CompositorWorkerThread::create(nullptr, *m_objectProxy, 0);
- WorkerClients* clients = nullptr;
+ WorkerClients* clients = WorkerClients::create();
+ provideCompositorProxyClientTo(clients, new TestCompositorProxyClient);
workerThread->start(WorkerThreadStartupData::create(
KURL(ParsedURLString, "http://fake.url/"),
"fake user agent",

Powered by Google App Engine
This is Rietveld 408576698