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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.html

Issue 2207093002: [DevTools] InspectorTest.evaluateInPageAsync uses Runtime.evaluate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.html b/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.html
index 6abd358496424fe682752be0f0a8374d7da17d53..fa11c691bc783175299b564755da725e77790969 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.html
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.html
@@ -6,14 +6,16 @@
var worker;
var onMessageCallbacks = {};
-function startWorker(callback)
+function startWorker()
{
+ var callback;
+ var promise = new Promise((fulfill) => callback = fulfill);
worker = new Worker("../resources/worker-console-worker.js");
worker.onmessage = function(event) {
worker.onmessage = onMessageFromWorker;
- if (callback)
- callback();
+ callback();
};
+ return promise;
}
function logInWorkerFromPage(message, callback)
@@ -133,7 +135,7 @@ function test()
function start0(next)
{
InspectorTest.log("Starting worker");
- InspectorTest.evaluateInPageAsync("startWorker(%callback)", next);
+ InspectorTest.evaluateInPageAsync("startWorker()").then(next);
},
function log0(next)
@@ -150,7 +152,7 @@ function test()
function start1(next)
{
InspectorTest.log("Starting worker");
- InspectorTest.evaluateInPageAsync("startWorker(%callback)", next);
+ InspectorTest.evaluateInPageAsync("startWorker()").then(next);
},
function log1(next)
@@ -213,7 +215,7 @@ function test()
function start2(next)
{
InspectorTest.log("Starting worker");
- InspectorTest.evaluateInPageAsync("startWorker(%callback)", next);
+ InspectorTest.evaluateInPageAsync("startWorker()").then(next);
},
function log4(next)
@@ -247,7 +249,7 @@ function test()
function start3(next)
{
InspectorTest.log("Starting worker");
- InspectorTest.evaluateInPageAsync("startWorker(%callback)", next);
+ InspectorTest.evaluateInPageAsync("startWorker()").then(next);
},
function log6(next)
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698