Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 test() | |
| 19 { | |
| 20 InspectorTest.addSniffer(WebInspector.RuntimeModel.prototype, "_executionCon textCreated", contextCreated); | |
| 21 InspectorTest.evaluateInPage("startWorker()"); | |
| 22 | |
| 23 function contextCreated() | |
| 24 { | |
| 25 InspectorTest.changeExecutionContext("worker-with-throw.js"); | |
| 26 InspectorTest.evaluateInPage("postMessageToWorker()", step2); | |
| 27 } | |
| 28 | |
| 29 function step2() | |
| 30 { | |
| 31 InspectorTest.expandConsoleMessages(step3); | |
|
vsevik
2014/12/01 15:06:02
I'd like to see both cases tested here: when the e
kozy
2014/12/01 16:17:05
Done.
And yes, stack trace with correct urls alrea
| |
| 32 } | |
| 33 | |
| 34 function step3() | |
| 35 { | |
| 36 InspectorTest.dumpConsoleMessages(); | |
| 37 InspectorTest.completeTest(); | |
| 38 } | |
| 39 }; | |
| 40 </script> | |
| 41 </head> | |
| 42 <body onload="runTest()"> | |
| 43 <p>Tests exception message from worker contains stack trace.</p> | |
| 44 </body> | |
| 45 </html> | |
| OLD | NEW |