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

Side by Side Diff: LayoutTests/inspector/console/worker-exception-message-contains-stack.html

Issue 743153002: [DevTools] Show stack trace for exceptions in dedicated workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@worker-capture-stack
Patch Set: Rebased Created 6 years 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
(Empty)
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script>
6 var worker;
7
8 function startWorker()
9 {
10 worker = new Worker("resources/worker-with-throw.js");
11 }
12
13 function postMessageToWorker()
14 {
15 worker.postMessage();
16 }
17
18 function setupErrorHandler()
19 {
20 worker.onerror = function(e) {
21 console.log(e.message);
22 e.preventDefault();
23 }
24 }
25
26 function test()
27 {
28 InspectorTest.addSniffer(WebInspector.RuntimeModel.prototype, "_executionCon textCreated", contextCreated);
29 InspectorTest.evaluateInPage("startWorker()");
30
31 function contextCreated()
32 {
33 InspectorTest.evaluateInPage("postMessageToWorker()", step2);
34 }
35
36 function step2()
37 {
38 InspectorTest.evaluateInPage("setupErrorHandler()", step3);
39 }
40
41 function step3()
42 {
43 InspectorTest.evaluateInPage("postMessageToWorker()", step4);
44 }
45
46 function step4()
47 {
48 InspectorTest.expandConsoleMessages(step5);
49 }
50
51 function step5()
52 {
53 InspectorTest.dumpConsoleMessages();
54 InspectorTest.completeTest();
55 }
56 };
57 </script>
58 </head>
59 <body onload="runTest()">
60 <p>Tests exception message from worker contains stack trace.</p>
61 </body>
62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698