Chromium Code Reviews| Index: LayoutTests/inspector/console/worker-exception-message-contains-stack.html |
| diff --git a/LayoutTests/inspector/console/worker-exception-message-contains-stack.html b/LayoutTests/inspector/console/worker-exception-message-contains-stack.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1555b1ea1c8ea6b04cb429336cc1ae67e00836de |
| --- /dev/null |
| +++ b/LayoutTests/inspector/console/worker-exception-message-contains-stack.html |
| @@ -0,0 +1,45 @@ |
| +<html> |
| +<head> |
| +<script src="../../http/tests/inspector/inspector-test.js"></script> |
| +<script src="../../http/tests/inspector/console-test.js"></script> |
| +<script> |
| +var worker; |
| + |
| +function startWorker() |
| +{ |
| + worker = new Worker("resources/worker-with-throw.js"); |
| +} |
| + |
| +function postMessageToWorker() |
| +{ |
| + worker.postMessage(); |
| +} |
| + |
| +function test() |
| +{ |
| + InspectorTest.addSniffer(WebInspector.RuntimeModel.prototype, "_executionContextCreated", contextCreated); |
| + InspectorTest.evaluateInPage("startWorker()"); |
| + |
| + function contextCreated() |
| + { |
| + InspectorTest.changeExecutionContext("worker-with-throw.js"); |
| + InspectorTest.evaluateInPage("postMessageToWorker()", step2); |
| + } |
| + |
| + function step2() |
| + { |
| + 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
|
| + } |
| + |
| + function step3() |
| + { |
| + InspectorTest.dumpConsoleMessages(); |
| + InspectorTest.completeTest(); |
| + } |
| +}; |
| +</script> |
| +</head> |
| +<body onload="runTest()"> |
| +<p>Tests exception message from worker contains stack trace.</p> |
| +</body> |
| +</html> |