| Index: third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker-loop.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker-loop.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker-loop.html
|
| index e0d98882200a559b968ae4d39eea6f70aa73f88a..cb7cacfc29cd103b3e013507e9886ddd9312814d 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker-loop.html
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker-loop.html
|
| @@ -22,9 +22,9 @@ function test()
|
| var workerRequestId = 1;
|
| function sendCommandToWorker(method, params)
|
| {
|
| - InspectorTest.sendCommand("Worker.sendMessageToWorker",
|
| + InspectorTest.sendCommand("Target.sendMessageToTarget",
|
| {
|
| - "workerId": workerId,
|
| + "targetId": workerId,
|
| "message": JSON.stringify({ "method": method,
|
| "params": params,
|
| "id": workerRequestId })
|
| @@ -39,22 +39,17 @@ function test()
|
| InspectorTest.completeTest();
|
| }
|
| }
|
| - InspectorTest.sendCommand("Worker.enable", {}, didEnableWorkerDebugging);
|
| + InspectorTest.sendCommand("Target.setAutoAttach", {autoAttach: true, waitForDebuggerOnStart: false}, didEnableWorkerDebugging);
|
|
|
| var evaluateRequestId = -1;
|
| var debuggerEnableRequestId = -1;
|
| - InspectorTest.eventHandler["Worker.workerCreated"] = function(messageObject)
|
| + InspectorTest.eventHandler["Target.attachedToTarget"] = function(messageObject)
|
| {
|
| - workerId = messageObject["params"]["workerId"];
|
| + workerId = messageObject["params"]["targetInfo"]["targetId"];
|
| InspectorTest.log("Worker created");
|
| - InspectorTest.sendCommand("Worker.connectToWorker", { "workerId": workerId }, didConnectToWorker);
|
| -
|
| - function didConnectToWorker(messageObject)
|
| - {
|
| - InspectorTest.log("didConnectToWorker");
|
| - // Enable debugger so that V8 can interrupt and handle inspector commands while there is a script running in a tight loop.
|
| - debuggerEnableRequestId = sendCommandToWorker("Debugger.enable", {});
|
| - }
|
| + InspectorTest.log("didConnectToWorker");
|
| + // Enable debugger so that V8 can interrupt and handle inspector commands while there is a script running in a tight loop.
|
| + debuggerEnableRequestId = sendCommandToWorker("Debugger.enable", {});
|
| }
|
|
|
| InspectorTest.workerMessageReceived = function()
|
| @@ -62,7 +57,7 @@ function test()
|
| evaluateRequestId = sendCommandToWorker("Runtime.evaluate", { "expression": "message_id > 1"});
|
| }
|
|
|
| - InspectorTest.eventHandler["Worker.dispatchMessageFromWorker"] = function(messageObject)
|
| + InspectorTest.eventHandler["Target.receivedMessageFromTarget"] = function(messageObject)
|
| {
|
| var message = JSON.parse(messageObject["params"]["message"]);
|
| if (message["id"] === debuggerEnableRequestId) {
|
|
|