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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.js

Issue 2951913002: [DevTools] Support multiple sessions in Target domain (Closed)
Patch Set: simplify Created 3 years, 6 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/exception-from-worker-contains-stack.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.js b/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.js
index 37b6fa13618bb93cfff8f77fa558a42acb31eee8..9fe244591efb1b8dcceb30907403217185352360 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.js
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.js
@@ -2,18 +2,18 @@
let {page, session, dp} = await testRunner.startBlank('Tests that console message from worker contains stack trace.');
var workerRequestId = 1;
- function sendCommandToWorker(method, params, workerId) {
+ function sendCommandToWorker(method, params, workerSessionId) {
dp.Target.sendMessageToTarget({
- targetId: workerId,
+ sessionId: workerSessionId,
message: JSON.stringify({ method: method, params: params, id: workerRequestId++ })
});
}
var waitForWorkers = 2;
dp.Target.onAttachedToTarget(messageObject => {
- var workerId = messageObject['params']['targetInfo']['targetId'];
+ var workerSessionId = messageObject.params.sessionId;
testRunner.log('Worker created');
- sendCommandToWorker('Runtime.enable', {}, workerId);
+ sendCommandToWorker('Runtime.enable', {}, workerSessionId);
if (!--waitForWorkers)
session.evaluate('worker1.postMessage(239);worker2.postMessage(42);');
});

Powered by Google App Engine
This is Rietveld 408576698