Index: third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp |
diff --git a/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp b/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp |
index 45dc2320efc8d2271a4ce525e74c5044b18a2bae..9985d4a850cb2237a28e55e2dd5d18eba490257a 100644 |
--- a/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp |
+++ b/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp |
@@ -63,8 +63,7 @@ class ThreadedWorkletThreadForTest : public WorkerThread { |
void countFeature(UseCounter::Feature feature) { |
EXPECT_TRUE(isCurrentThread()); |
globalScope()->countFeature(feature); |
- getParentFrameTaskRunners() |
- ->get(TaskType::UnspecedTimer) |
+ FrameTaskRunnerHelper::get(TaskType::UnspecedTimer, globalScope()) |
->postTask(BLINK_FROM_HERE, crossThreadBind(&testing::exitRunLoop)); |
} |
@@ -79,8 +78,7 @@ class ThreadedWorkletThreadForTest : public WorkerThread { |
String consoleMessage = consoleMessageStorage()->at(0)->message(); |
EXPECT_TRUE(consoleMessage.contains("deprecated")); |
- getParentFrameTaskRunners() |
- ->get(TaskType::UnspecedTimer) |
+ FrameTaskRunnerHelper::get(TaskType::UnspecedTimer, globalScope()) |
->postTask(BLINK_FROM_HERE, crossThreadBind(&testing::exitRunLoop)); |
} |
}; |
@@ -104,7 +102,7 @@ class ThreadedWorkletMessagingProxyForTest |
ThreadedWorkletThreadForTest::clearSharedBackingThread(); |
}; |
- void start() { |
+ void start(Document& document) { |
KURL scriptURL(ParsedURLString, "http://fake.url/"); |
std::unique_ptr<Vector<char>> cachedMetaData = nullptr; |
Vector<CSPHeaderAndType> contentSecurityPolicyHeaders; |
@@ -121,7 +119,7 @@ class ThreadedWorkletMessagingProxyForTest |
m_securityOrigin.get(), workerClients, WebAddressSpaceLocal, |
&originTrialTokens, std::move(workerSettings), |
WorkerV8Settings::Default()), |
- getParentFrameTaskRunners()); |
+ FrameTaskRunnersHolder::create(document.frame())); |
workerInspectorProxy()->workerThreadCreated( |
toDocument(getExecutionContext()), m_workerThread.get(), scriptURL); |
} |
@@ -165,7 +163,7 @@ class ThreadedWorkletTest : public ::testing::Test { |
}; |
TEST_F(ThreadedWorkletTest, UseCounter) { |
- messagingProxy()->start(); |
+ messagingProxy()->start(document()); |
// This feature is randomly selected. |
const UseCounter::Feature feature1 = UseCounter::Feature::RequestFileSystem; |