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

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

Issue 2249743006: [DevTools] Fill ExceptionDetails with more details, unify usage across protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: browser test 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 unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script> 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script> 4 <script>
5 5
6 var worker1; 6 var worker1;
7 var worker2; 7 var worker2;
8 8
9 function startWorkers() 9 function startWorkers()
10 { 10 {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 if (!--waitForWorkers) 46 if (!--waitForWorkers)
47 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "wo rker1.postMessage(239);worker2.postMessage(42);" }); 47 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "wo rker1.postMessage(239);worker2.postMessage(42);" });
48 } 48 }
49 49
50 var workerTerminated = false; 50 var workerTerminated = false;
51 var messageReceived = false; 51 var messageReceived = false;
52 InspectorTest.eventHandler["Worker.dispatchMessageFromWorker"] = function(me ssageObject) 52 InspectorTest.eventHandler["Worker.dispatchMessageFromWorker"] = function(me ssageObject)
53 { 53 {
54 var message = JSON.parse(messageObject["params"]["message"]); 54 var message = JSON.parse(messageObject["params"]["message"]);
55 if (message["method"] === "Runtime.exceptionThrown") { 55 if (message["method"] === "Runtime.exceptionThrown") {
56 var callFrames = message.params.details.stackTrace ? message.params. details.stackTrace.callFrames : []; 56 var callFrames = message.params.exceptionDetails.stackTrace ? messag e.params.exceptionDetails.stackTrace.callFrames : [];
57 InspectorTest.log(callFrames.length > 0 ? "Message with stack trace received." : "[FAIL] Message contains empty stack trace"); 57 InspectorTest.log(callFrames.length > 0 ? "Message with stack trace received." : "[FAIL] Message contains empty stack trace");
58 messageReceived = true; 58 messageReceived = true;
59 if (messageReceived && workerTerminated) 59 if (messageReceived && workerTerminated)
60 InspectorTest.completeTest(); 60 InspectorTest.completeTest();
61 } 61 }
62 } 62 }
63 63
64 InspectorTest.eventHandler["Worker.workerTerminated"] = function(messageObje ct) 64 InspectorTest.eventHandler["Worker.workerTerminated"] = function(messageObje ct)
65 { 65 {
66 InspectorTest.eventHandler["Worker.workerTerminated"] = undefined; 66 InspectorTest.eventHandler["Worker.workerTerminated"] = undefined;
67 workerTerminated = true; 67 workerTerminated = true;
68 if (messageReceived && workerTerminated) 68 if (messageReceived && workerTerminated)
69 InspectorTest.completeTest(); 69 InspectorTest.completeTest();
70 } 70 }
71 } 71 }
72 </script> 72 </script>
73 </head> 73 </head>
74 <body onload="runTest()">Tests that console message from worker contains stack t race.</body> 74 <body onload="runTest()">Tests that console message from worker contains stack t race.</body>
75 </html> 75 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698