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

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

Issue 2116563003: [DevTools] Report unhandled exceptions and promise rejections through Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after ExceptionDetails change Created 4 years, 5 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/console/exception-from-worker-contains-stack.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/console/exception-from-worker-contains-stack.html b/third_party/WebKit/LayoutTests/inspector-protocol/console/exception-from-worker-contains-stack.html
index 88a3050fa7bca64741570dacb05d58da0c04f797..4a8f0f154528eddb8dfbccfc943755d92050f44e 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/console/exception-from-worker-contains-stack.html
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/console/exception-from-worker-contains-stack.html
@@ -43,7 +43,7 @@ function test()
{
var workerId = messageObject["params"]["workerId"];
InspectorTest.log("Worker created");
- sendCommandToWorker("Console.enable", {}, workerId);
+ sendCommandToWorker("Runtime.enable", {}, workerId);
if (!--waitForWorkers)
InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "worker1.postMessage(239);worker2.postMessage(42);" });
}
@@ -53,11 +53,9 @@ function test()
InspectorTest.eventHandler["Worker.dispatchMessageFromWorker"] = function(messageObject)
{
var message = JSON.parse(messageObject["params"]["message"]);
- if (message["method"] === "Console.messageAdded") {
- var callFrames = message.params.message.stack.callFrames;
- if (callFrames.length < 2 || callFrames[1].functionName !== "boo1")
- return;
- InspectorTest.log(message.params.message.stack.callFrames.length > 0 ? "Message with stack trace received." : "[FAIL] Message contains empty stack trace");
+ if (message["method"] === "Runtime.exceptionThrown") {
+ var callFrames = message.params.details.stack ? message.params.details.stack.callFrames : [];
+ InspectorTest.log(callFrames.length > 0 ? "Message with stack trace received." : "[FAIL] Message contains empty stack trace");
messageReceived = true;
if (messageReceived && workerTerminated)
InspectorTest.completeTest();

Powered by Google App Engine
This is Rietveld 408576698