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

Unified Diff: third_party/WebKit/Source/core/workers/MainThreadWorkletTest.cpp

Issue 2830603003: Worklet: Move WorkletScriptLoader from MainThreadWorklet to MainThreadWorkletGlobalScope (Closed)
Patch Set: const auto& Created 3 years, 8 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/core/workers/MainThreadWorkletTest.cpp
diff --git a/third_party/WebKit/Source/core/workers/MainThreadWorkletTest.cpp b/third_party/WebKit/Source/core/workers/MainThreadWorkletTest.cpp
index 99dc171f0cd68fdbd21a323b0295ccd895fd4b84..8351879756e909e51b2aa7606fe1bb0b9540347e 100644
--- a/third_party/WebKit/Source/core/workers/MainThreadWorkletTest.cpp
+++ b/third_party/WebKit/Source/core/workers/MainThreadWorkletTest.cpp
@@ -11,6 +11,19 @@
namespace blink {
+namespace {
+
+class WorkletObjectProxyForTest final
+ : public GarbageCollectedFinalized<WorkletObjectProxyForTest>,
+ public WorkletObjectProxy {
+ USING_GARBAGE_COLLECTED_MIXIN(WorkletObjectProxyForTest);
+
+ public:
+ void DidFetchAndInvokeScript(int32_t request_id, bool success) {}
+};
+
+} // namespace
+
class MainThreadWorkletTest : public ::testing::Test {
public:
void SetUp() override {
@@ -19,7 +32,8 @@ class MainThreadWorkletTest : public ::testing::Test {
security_origin_ = SecurityOrigin::Create(url);
global_scope_ = new MainThreadWorkletGlobalScope(
&page_->GetFrame(), url, "fake user agent", security_origin_.Get(),
- ToIsolate(page_->GetFrame().GetDocument()));
+ ToIsolate(page_->GetFrame().GetDocument()),
+ new WorkletObjectProxyForTest);
}
void TearDown() override { global_scope_->TerminateWorkletGlobalScope(); }

Powered by Google App Engine
This is Rietveld 408576698