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

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

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add big fat TODOs in scheduler code to implement proper idle task scheduling and ensure GC is runni… 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 c2fcf32d3597d9d9db7c90ae4bb922bdab7a45db..6616fdd51a07b411258e60c745d3821948b70e5d 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 requestAnimationFrame() override {}
+};
+
class CompositorWorkerTestPlatform : public TestingPlatformSupport {
public:
CompositorWorkerTestPlatform()
@@ -91,13 +103,14 @@ public:
void TearDown() override
{
m_page.clear();
- CompositorWorkerThread::resetSharedBackingThreadForTest();
+ CompositorWorkerThread::clearSharedBackingThread();
}
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