2010-10-13 Yury Semikhatsky <yurys@chromium.org>
[WebKit-https.git] / LayoutTests / inspector / console-uncaught-exception-in-eval.html
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test2.js"></script>
4 <script src="../http/tests/inspector/console-tests2.js"></script>
5 <script>
6
7 function test()
8 {
9     InspectorTest.reloadPage(function() {
10         InspectorTest.expandConsoleMessages();
11         InspectorTest.dumpConsoleMessages();
12         InspectorTest.completeTest();
13     });
14 }
15
16
17 function evalSource()
18 {
19     function b()
20     {
21         throw new Error("Exception in eval.");
22     }
23
24     function a()
25     {
26         b();
27     }
28
29     a();
30     dumpConsoleMessages();
31 }
32
33 eval("(" + evalSource + ")()//@ sourceURL=evalURL.js");
34
35 </script>
36 </head>
37
38 <body onload="runTest()">
39 <p>
40 Tests that when uncaught exception in eval'ed script ending
41 with //@ sourceURL=url is logged into console, its stack trace
42 will have the url as the script source. <a href="https://bugs.webkit.org/show_bug.cgi?id=47252">Bug 47252.</a>
43 </p>
44
45 </body>
46 </html>