| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../http/tests/inspector/console-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function startWorker() | 6 function startWorker() |
| 7 { | 7 { |
| 8 var worker = new Worker("resources/worker.js"); | 8 var worker = new Worker("resources/worker.js"); |
| 9 } | 9 } |
| 10 | 10 |
| 11 function test() | 11 function test() |
| 12 { | 12 { |
| 13 InspectorTest.addSniffer(WebInspector.RuntimeModel.prototype, "_executionCon
textCreated", contextCreated); | 13 InspectorTest.addSniffer(SDK.RuntimeModel.prototype, "_executionContextCreat
ed", contextCreated); |
| 14 InspectorTest.evaluateInPage("startWorker()"); | 14 InspectorTest.evaluateInPage("startWorker()"); |
| 15 | 15 |
| 16 function contextCreated() | 16 function contextCreated() |
| 17 { | 17 { |
| 18 InspectorTest.changeExecutionContext("\u2699 worker.js"); | 18 InspectorTest.changeExecutionContext("\u2699 worker.js"); |
| 19 InspectorTest.evaluateInConsole("\ | 19 InspectorTest.evaluateInConsole("\ |
| 20 function foo()\n\ | 20 function foo()\n\ |
| 21 {\n\ | 21 {\n\ |
| 22 throw {a:239};\n\ | 22 throw {a:239};\n\ |
| 23 }\n\ | 23 }\n\ |
| (...skipping 14 matching lines...) Expand all Loading... |
| 38 InspectorTest.dumpConsoleMessages(); | 38 InspectorTest.dumpConsoleMessages(); |
| 39 InspectorTest.completeTest(); | 39 InspectorTest.completeTest(); |
| 40 } | 40 } |
| 41 }; | 41 }; |
| 42 </script> | 42 </script> |
| 43 </head> | 43 </head> |
| 44 <body onload="runTest()"> | 44 <body onload="runTest()"> |
| 45 <p>Tests exception message from eval on worker context in console contains stack
trace.</p> | 45 <p>Tests exception message from eval on worker context in console contains stack
trace.</p> |
| 46 </body> | 46 </body> |
| 47 </html> | 47 </html> |
| OLD | NEW |