| Index: third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp b/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
|
| index 3ead61f16c9d5520f178887c3cf1d7c62d677350..47ea2e6e7941272ef3d5878fb6505b1f38c87adf 100644
|
| --- a/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
|
| +++ b/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
|
| @@ -2,6 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include <memory>
|
| +#include "core/dom/TaskRunnerHelper.h"
|
| #include "core/events/MessageEvent.h"
|
| #include "core/inspector/ConsoleMessageStorage.h"
|
| #include "core/testing/DummyPageHolder.h"
|
| @@ -17,7 +19,6 @@
|
| #include "platform/testing/UnitTestHelpers.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| -#include <memory>
|
|
|
| namespace blink {
|
|
|
| @@ -384,10 +385,11 @@ TEST_F(DedicatedWorkerTest, 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(&DedicatedWorkerThreadForTest::countFeature,
|
| - crossThreadUnretained(workerThread()), feature1));
|
| + TaskRunnerHelper::get(TaskType::UnspecedTimer, workerThread())
|
| + ->postTask(
|
| + BLINK_FROM_HERE,
|
| + crossThreadBind(&DedicatedWorkerThreadForTest::countFeature,
|
| + crossThreadUnretained(workerThread()), feature1));
|
| testing::enterRunLoop();
|
| EXPECT_TRUE(UseCounter::isCounted(document(), feature1));
|
|
|
| @@ -397,10 +399,11 @@ TEST_F(DedicatedWorkerTest, UseCounter) {
|
| // Deprecated API use on the DedicatedWorkerGlobalScope should be recorded in
|
| // UseCounter on the Document.
|
| EXPECT_FALSE(UseCounter::isCounted(document(), feature2));
|
| - workerThread()->postTask(
|
| - BLINK_FROM_HERE,
|
| - crossThreadBind(&DedicatedWorkerThreadForTest::countDeprecation,
|
| - crossThreadUnretained(workerThread()), feature2));
|
| + TaskRunnerHelper::get(TaskType::UnspecedTimer, workerThread())
|
| + ->postTask(
|
| + BLINK_FROM_HERE,
|
| + crossThreadBind(&DedicatedWorkerThreadForTest::countDeprecation,
|
| + crossThreadUnretained(workerThread()), feature2));
|
| testing::enterRunLoop();
|
| EXPECT_TRUE(UseCounter::isCounted(document(), feature2));
|
| }
|
|
|