3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/console-test.js"></script>
7 function evalSource(name
)
11 throw new Error("Exception in eval:" + name
);
22 function doEvalWithSourceURL()
24 var source
= "(" + evalSource
+ ")(\"with sourceURL\")//# sourceURL=evalURL.js";
25 setTimeout(eval
.bind(this, source
), 0);
28 function doAnonymousEvalWith()
30 var source
= "(" + evalSource
+ ")(\"anonymous\")";
31 setTimeout(eval
.bind(this, source
), 0);
36 InspectorTest
.evaluateInPage("doEvalWithSourceURL()", step2
.bind(this));
40 InspectorTest
.evaluateInPage("doAnonymousEvalWith()", step3
.bind(this));
45 if (WebInspector
.ConsolePanel
._view()._visibleViewMessages
.length
< 2)
46 InspectorTest
.addConsoleSniffer(step3
);
53 InspectorTest
.expandConsoleMessages(onExpanded
);
58 InspectorTest
.dumpConsoleMessages();
59 InspectorTest
.completeTest();
66 <body onload=
"runTest()">
68 Tests that when uncaught exception in eval'ed script ending
69 with //# sourceURL=url is logged into console, its stack trace
70 will have the url as the script source.
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=47252">Bug
47252.
</a>