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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp

Issue 2806623004: Worker: Introduce per-global-scope task scheduler (Closed)
Patch Set: wip Created 3 years, 8 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/modules/webaudio/AudioWorkletGlobalScopeTest.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp
index a4fdd9a621ac9e6189eff363f58aab2873344f59..51ae1a7c405b20fdb12e76e326ba94bb97c61e73 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp
@@ -15,6 +15,7 @@
#include "bindings/core/v8/V8GCController.h"
#include "bindings/core/v8/V8ObjectConstructor.h"
#include "bindings/core/v8/WorkerOrWorkletScriptController.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/workers/WorkerBackingThread.h"
#include "core/workers/WorkerReportingProxy.h"
#include "core/workers/WorkerThreadStartupData.h"
@@ -62,34 +63,37 @@ class AudioWorkletGlobalScopeTest : public ::testing::Test {
void runBasicTest(WorkerThread* thread) {
WaitableEvent waitableEvent;
- thread->postTask(
- BLINK_FROM_HERE,
- crossThreadBind(
- &AudioWorkletGlobalScopeTest::runBasicTestOnWorkletThread,
- crossThreadUnretained(this), crossThreadUnretained(thread),
- crossThreadUnretained(&waitableEvent)));
+ TaskRunnerHelper::get(TaskType::Unthrottled, thread)
+ ->postTask(
+ BLINK_FROM_HERE,
+ crossThreadBind(
+ &AudioWorkletGlobalScopeTest::runBasicTestOnWorkletThread,
+ crossThreadUnretained(this), crossThreadUnretained(thread),
+ crossThreadUnretained(&waitableEvent)));
waitableEvent.wait();
}
void runSimpleProcessTest(WorkerThread* thread) {
WaitableEvent waitableEvent;
- thread->postTask(
- BLINK_FROM_HERE,
- crossThreadBind(
- &AudioWorkletGlobalScopeTest::runSimpleProcessTestOnWorkletThread,
- crossThreadUnretained(this), crossThreadUnretained(thread),
- crossThreadUnretained(&waitableEvent)));
+ TaskRunnerHelper::get(TaskType::Unthrottled, thread)
+ ->postTask(BLINK_FROM_HERE,
+ crossThreadBind(&AudioWorkletGlobalScopeTest::
+ runSimpleProcessTestOnWorkletThread,
+ crossThreadUnretained(this),
+ crossThreadUnretained(thread),
+ crossThreadUnretained(&waitableEvent)));
waitableEvent.wait();
}
void runParsingTest(WorkerThread* thread) {
WaitableEvent waitableEvent;
- thread->postTask(
- BLINK_FROM_HERE,
- crossThreadBind(
- &AudioWorkletGlobalScopeTest::runParsingTestOnWorkletThread,
- crossThreadUnretained(this), crossThreadUnretained(thread),
- crossThreadUnretained(&waitableEvent)));
+ TaskRunnerHelper::get(TaskType::Unthrottled, thread)
+ ->postTask(
+ BLINK_FROM_HERE,
+ crossThreadBind(
+ &AudioWorkletGlobalScopeTest::runParsingTestOnWorkletThread,
+ crossThreadUnretained(this), crossThreadUnretained(thread),
+ crossThreadUnretained(&waitableEvent)));
waitableEvent.wait();
}

Powered by Google App Engine
This is Rietveld 408576698