Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector/tracing/worker-events.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/worker-events.html b/third_party/WebKit/LayoutTests/inspector/tracing/worker-events.html |
| index 54a66c677a14ec81aac67d9accc7d0ab72fce377..e2f975eeabcb3a38334fd67feddc4b50e8d42ce8 100644 |
| --- a/third_party/WebKit/LayoutTests/inspector/tracing/worker-events.html |
| +++ b/third_party/WebKit/LayoutTests/inspector/tracing/worker-events.html |
| @@ -25,15 +25,18 @@ function startWorkerAndRunTest() |
| } |
| } |
| -function startSecondWorker(onActionComplete) |
| +function startSecondWorker() |
| { |
| + var callback; |
| + var promise = new Promise((fulfill) => callback = fulfill); |
| worker2 = new Worker("resources/worker.js"); |
| worker2.postMessage(""); |
| worker2.onmessage = function(event) |
| { |
| - onActionComplete(); |
| + callback(); |
| worker2.onmessage = null; |
| } |
| + return promise; |
|
caseq
2016/08/05 17:56:43
return new Promise(fulfill => worker2.onmessage =
kozy
2016/08/10 01:21:15
Done.
|
| } |
| function test() |