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