Index: components/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc |
diff --git a/components/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc b/components/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc |
index 40013a11d1a94f589377191a1d5c34b92f9fe5da..db4fd18726ed71e31877fd64aaff037b9ceb77b3 100644 |
--- a/components/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc |
+++ b/components/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc |
@@ -19,14 +19,14 @@ using testing::Invoke; |
namespace scheduler { |
namespace { |
-class NopTask : public blink::WebThread::Task { |
+class NopTask : public blink::WebTaskRunner::Task { |
public: |
~NopTask() override {} |
void run() {} |
}; |
-class MockTask : public blink::WebThread::Task { |
+class MockTask : public blink::WebTaskRunner::Task { |
public: |
~MockTask() override {} |
@@ -54,7 +54,7 @@ class TestObserver : public blink::WebThread::TaskObserver { |
std::string* calls_; // NOT OWNED |
}; |
-class TestTask : public blink::WebThread::Task { |
+class TestTask : public blink::WebTaskRunner::Task { |
public: |
explicit TestTask(std::string* calls) : calls_(calls) {} |
@@ -124,7 +124,7 @@ TEST_F(WebThreadImplForWorkerSchedulerTest, TestDefaultTask) { |
ON_CALL(*task, run()) |
.WillByDefault(Invoke([&completion]() { completion.Signal(); })); |
- thread_->postTask(blink::WebTraceLocation(), task.release()); |
+ thread_->taskRunner()->postTask(blink::WebTraceLocation(), task.release()); |
completion.Wait(); |
} |
@@ -137,7 +137,7 @@ TEST_F(WebThreadImplForWorkerSchedulerTest, |
ON_CALL(*task, run()) |
.WillByDefault(Invoke([&completion]() { completion.Signal(); })); |
- thread_->postTask(blink::WebTraceLocation(), task.release()); |
+ thread_->taskRunner()->postTask(blink::WebTraceLocation(), task.release()); |
thread_.reset(); |
} |
@@ -151,7 +151,8 @@ TEST_F(WebThreadImplForWorkerSchedulerTest, TestIdleTask) { |
thread_->postIdleTask(blink::WebTraceLocation(), task.release()); |
// We need to post a wakeup task or idle work will never happen. |
- thread_->postDelayedTask(blink::WebTraceLocation(), new NopTask(), 50ul); |
+ thread_->taskRunner()->postDelayedTask(blink::WebTraceLocation(), |
+ new NopTask(), 50ll); |
completion.Wait(); |
} |
@@ -162,7 +163,8 @@ TEST_F(WebThreadImplForWorkerSchedulerTest, TestTaskObserver) { |
RunOnWorkerThread(FROM_HERE, |
base::Bind(&addTaskObserver, thread_.get(), &observer)); |
- thread_->postTask(blink::WebTraceLocation(), new TestTask(&calls)); |
+ thread_->taskRunner()->postTask(blink::WebTraceLocation(), |
+ new TestTask(&calls)); |
RunOnWorkerThread(FROM_HERE, |
base::Bind(&removeTaskObserver, thread_.get(), &observer)); |
@@ -182,8 +184,9 @@ TEST_F(WebThreadImplForWorkerSchedulerTest, TestShutdown) { |
EXPECT_CALL(*delayed_task, run()).Times(0); |
RunOnWorkerThread(FROM_HERE, base::Bind(&shutdownOnThread, thread_.get())); |
- thread_->postTask(blink::WebTraceLocation(), task.release()); |
- thread_->postDelayedTask(blink::WebTraceLocation(), task.release(), 50ul); |
+ thread_->taskRunner()->postTask(blink::WebTraceLocation(), task.release()); |
+ thread_->taskRunner()->postDelayedTask(blink::WebTraceLocation(), |
+ task.release(), 50ll); |
thread_.reset(); |
} |