| 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..3136a16fa1e4972a0926bf3e2071211903cde9ab 100644
|
| --- a/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp
|
| +++ b/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp
|
| @@ -2,6 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "core/dom/TaskRunnerHelper.h"
|
| #include "core/inspector/ConsoleMessageStorage.h"
|
| #include "core/testing/DummyPageHolder.h"
|
| #include "core/workers/ThreadedWorkletGlobalScope.h"
|
| @@ -173,10 +174,11 @@ TEST_F(ThreadedWorkletTest, UseCounter) {
|
| // API use on the DedicatedWorkerGlobalScope should be recorded in UseCounter
|
| // on the Document.
|
| EXPECT_FALSE(UseCounter::isCounted(document(), feature1));
|
| - workerThread()->postTask(
|
| - BLINK_FROM_HERE,
|
| - crossThreadBind(&ThreadedWorkletThreadForTest::countFeature,
|
| - crossThreadUnretained(workerThread()), feature1));
|
| + TaskRunnerHelper::get(TaskType::UnspecedTimer, workerThread())
|
| + ->postTask(
|
| + BLINK_FROM_HERE,
|
| + crossThreadBind(&ThreadedWorkletThreadForTest::countFeature,
|
| + crossThreadUnretained(workerThread()), feature1));
|
| testing::enterRunLoop();
|
| EXPECT_TRUE(UseCounter::isCounted(document(), feature1));
|
|
|
| @@ -186,10 +188,11 @@ TEST_F(ThreadedWorkletTest, UseCounter) {
|
| // Deprecated API use on the ThreadedWorkletGlobalScope should be recorded in
|
| // UseCounter on the Document.
|
| EXPECT_FALSE(UseCounter::isCounted(document(), feature2));
|
| - workerThread()->postTask(
|
| - BLINK_FROM_HERE,
|
| - crossThreadBind(&ThreadedWorkletThreadForTest::countDeprecation,
|
| - crossThreadUnretained(workerThread()), feature2));
|
| + TaskRunnerHelper::get(TaskType::UnspecedTimer, workerThread())
|
| + ->postTask(
|
| + BLINK_FROM_HERE,
|
| + crossThreadBind(&ThreadedWorkletThreadForTest::countDeprecation,
|
| + crossThreadUnretained(workerThread()), feature2));
|
| testing::enterRunLoop();
|
| EXPECT_TRUE(UseCounter::isCounted(document(), feature2));
|
| }
|
|
|