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

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

Issue 2716853002: (WIP) Worker: Merge ParentFrameTaskRunners into TaskRunnerHelper
Patch Set: WIP Created 3 years, 10 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/WorkerThreadTest.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp b/third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp
index e1d47385541b1f6f6ee3f518e4133b0a57d67cf4..787c2299cca5e06175814088332a68c008f1d337 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp
@@ -4,13 +4,14 @@
#include "core/workers/WorkerThread.h"
+#include <memory>
+#include "core/dom/TaskRunnerHelper.h"
#include "core/workers/WorkerThreadTestHelper.h"
#include "platform/WaitableEvent.h"
#include "platform/testing/UnitTestHelpers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "wtf/PtrUtil.h"
-#include <memory>
using testing::_;
using testing::AnyNumber;
@@ -28,8 +29,8 @@ void waitForSignalTask(WorkerThread* workerThread,
EXPECT_TRUE(workerThread->isCurrentThread());
// Notify the main thread that the debugger task is waiting for the signal.
- workerThread->getParentFrameTaskRunners()
- ->get(TaskType::UnspecedTimer)
+ FrameTaskRunnerHelper::get(TaskType::UnspecedTimer,
+ workerThread->globalScope())
->postTask(BLINK_FROM_HERE, crossThreadBind(&testing::exitRunLoop));
waitableEvent->wait();
}
@@ -59,7 +60,7 @@ class WorkerThreadTest : public ::testing::Test {
void start() {
m_workerThread->startWithSourceCode(
m_securityOrigin.get(), "//fake source code",
- ParentFrameTaskRunners::create(nullptr));
+ FrameTaskRunnersHolder::create(nullptr));
}
void startWithSourceCodeNotToFinish() {
@@ -67,7 +68,7 @@ class WorkerThreadTest : public ::testing::Test {
// can catch some kind of issues as a timeout.
m_workerThread->startWithSourceCode(
m_securityOrigin.get(), "while(true) {}",
- ParentFrameTaskRunners::create(nullptr));
+ FrameTaskRunnersHolder::create(nullptr));
}
void setForcibleTerminationDelayInMs(long long forcibleTerminationDelayInMs) {
@@ -284,7 +285,7 @@ TEST_F(WorkerThreadTest, Terminate_WhileDebuggerTaskIsRunningOnInitialization) {
WebAddressSpaceLocal, nullptr /* originTrialToken */,
nullptr /* WorkerSettings */, WorkerV8Settings::Default());
m_workerThread->start(std::move(startupData),
- ParentFrameTaskRunners::create(nullptr));
+ FrameTaskRunnersHolder::create(nullptr));
// Used to wait for worker thread termination in a debugger task on the
// worker thread.

Powered by Google App Engine
This is Rietveld 408576698