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 dc73e4b01257ae0c57e53b109f8b20cdab743dfb..1df01401b1c410717337e68af792130b6ead5f03 100644 |
--- a/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp |
+++ b/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.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 <memory> |
#include "core/events/MessageEvent.h" |
#include "core/inspector/ConsoleMessageStorage.h" |
#include "core/testing/DummyPageHolder.h" |
@@ -10,6 +11,7 @@ |
#include "core/workers/InProcessWorkerMessagingProxy.h" |
#include "core/workers/InProcessWorkerObjectProxy.h" |
#include "core/workers/WorkerInspectorProxy.h" |
+#include "core/workers/WorkerTaskRunners.h" |
#include "core/workers/WorkerThread.h" |
#include "core/workers/WorkerThreadStartupData.h" |
#include "core/workers/WorkerThreadTestHelper.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 { |
@@ -388,10 +389,13 @@ TEST_F(DedicatedWorkerTest, UseCounter) { |
// API use on the DedicatedWorkerGlobalScope should be recorded in UseCounter |
// on the Document. |
EXPECT_FALSE(UseCounter::IsCounted(GetDocument(), kFeature1)); |
- GetWorkerThread()->PostTask( |
- BLINK_FROM_HERE, |
- CrossThreadBind(&DedicatedWorkerThreadForTest::CountFeature, |
- CrossThreadUnretained(GetWorkerThread()), kFeature1)); |
+ GetWorkerThread() |
+ ->GetWorkerTaskRunners() |
+ ->Get(TaskType::kUnspecedTimer) |
+ ->PostTask( |
+ BLINK_FROM_HERE, |
+ CrossThreadBind(&DedicatedWorkerThreadForTest::CountFeature, |
+ CrossThreadUnretained(GetWorkerThread()), kFeature1)); |
testing::EnterRunLoop(); |
EXPECT_TRUE(UseCounter::IsCounted(GetDocument(), kFeature1)); |
@@ -402,10 +406,13 @@ TEST_F(DedicatedWorkerTest, UseCounter) { |
// Deprecated API use on the DedicatedWorkerGlobalScope should be recorded in |
// UseCounter on the Document. |
EXPECT_FALSE(UseCounter::IsCounted(GetDocument(), kFeature2)); |
- GetWorkerThread()->PostTask( |
- BLINK_FROM_HERE, |
- CrossThreadBind(&DedicatedWorkerThreadForTest::CountDeprecation, |
- CrossThreadUnretained(GetWorkerThread()), kFeature2)); |
+ GetWorkerThread() |
+ ->GetWorkerTaskRunners() |
+ ->Get(TaskType::kUnspecedTimer) |
+ ->PostTask( |
+ BLINK_FROM_HERE, |
+ CrossThreadBind(&DedicatedWorkerThreadForTest::CountDeprecation, |
+ CrossThreadUnretained(GetWorkerThread()), kFeature2)); |
testing::EnterRunLoop(); |
EXPECT_TRUE(UseCounter::IsCounted(GetDocument(), kFeature2)); |
} |