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

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

Issue 2442083002: [DevTools] Merge Worker domain to Target, migrate clients. (Closed)
Patch Set: rebased all tests Created 4 years, 2 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/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 fa11c691bc783175299b564755da725e77790969..51ac7afd4f6991a3821dde62f396255a498ffade 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.html
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.html
@@ -41,8 +41,8 @@ function stopWorker()
function test()
{
var workerEventHandler = {};
- InspectorTest.eventHandler["Worker.workerCreated"] = onWorkerCreated;
- InspectorTest.eventHandler["Worker.dispatchMessageFromWorker"] = onWorkerMessage;
+ InspectorTest.eventHandler["Target.attachedToTarget"] = onWorkerCreated;
+ InspectorTest.eventHandler["Target.receivedMessageFromTarget"] = onWorkerMessage;
workerEventHandler["Runtime.consoleAPICalled"] = onConsoleAPICalledFromWorker;
var workerId;
@@ -50,7 +50,7 @@ function test()
function onWorkerCreated(payload)
{
InspectorTest.log("Worker.created");
- workerId = payload.params.workerId;
+ workerId = payload.params.targetInfo.targetId;
}
var requestId = 0;
@@ -64,16 +64,16 @@ function test()
"params": params,
"id": requestId
};
- InspectorTest.sendCommandOrDie("Worker.sendMessageToWorker", {
- workerId: workerId,
+ InspectorTest.sendCommandOrDie("Target.sendMessageToTarget", {
+ targetId: workerId,
message: JSON.stringify(messageObject)
});
}
function onWorkerMessage(payload)
{
- if (payload.params.workerId !== workerId)
- InspectorTest.log("workerId mismatch");
+ if (payload.params.targetId !== workerId)
+ InspectorTest.log("targetId mismatch");
var messageObject = JSON.parse(payload.params.message);
var messageId = messageObject["id"];
if (typeof messageId === "number") {
@@ -162,8 +162,8 @@ function test()
function enable1(next)
{
- InspectorTest.log("Sending Worker.enable");
- InspectorTest.sendCommandOrDie("Worker.enable", {}, next);
+ InspectorTest.log("Starting autoattach");
+ InspectorTest.sendCommandOrDie("Target.setAutoAttach", {autoAttach: true, waitForDebuggerOnStart: false}, next);
},
function consoleEnable1(next)
@@ -190,8 +190,8 @@ function test()
function disable1(next)
{
- InspectorTest.log("Sending Worker.disable");
- InspectorTest.sendCommandOrDie("Worker.disable", {}, next);
+ InspectorTest.log("Stopping autoattach");
+ InspectorTest.sendCommandOrDie("Target.setAutoAttach", {autoAttach: false, waitForDebuggerOnStart: false}, next);
},
function log3(next)
@@ -208,8 +208,8 @@ function test()
function enable2(next)
{
- InspectorTest.log("Sending Worker.enable");
- InspectorTest.sendCommandOrDie("Worker.enable", {}, next);
+ InspectorTest.log("Starting autoattach");
+ InspectorTest.sendCommandOrDie("Target.setAutoAttach", {autoAttach: true, waitForDebuggerOnStart: false}, next);
},
function start2(next)
@@ -265,8 +265,8 @@ function test()
function disable2(next)
{
- InspectorTest.log("Sending Worker.disable");
- InspectorTest.sendCommandOrDie("Worker.disable", {}, next);
+ InspectorTest.log("Stopping autoattach");
+ InspectorTest.sendCommandOrDie("Target.setAutoAttach", {autoAttach: false, waitForDebuggerOnStart: false}, next);
}
];

Powered by Google App Engine
This is Rietveld 408576698