OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <head> | |
3 <script src="../inspector/inspector-test.js"></script> | |
4 <script type="text/javascript"> | |
5 function onload() | |
6 { | |
7 if (window.testRunner) | |
8 testRunner.waitUntilDone(); | |
9 setTimeout(showInspectorAndRunTest, 0); | |
10 | |
11 var scriptContents = "function foo() { FAIL.FAIL; } \n //# sourceURL=foo2.js "; | |
12 eval(scriptContents); | |
13 foo(); | |
14 } | |
15 | |
16 | |
17 function showInspectorAndRunTest() | |
18 { | |
19 if (window.testRunner) | |
20 testRunner.showWebInspector(); | |
21 runTest(); | |
22 } | |
23 | |
24 function test() | |
25 { | |
26 var messages = WebInspector.console.messages; | |
27 if (messages.length == 1) | |
28 { | |
29 var m = messages[0]; | |
30 InspectorTest.addResult("Message: " + WebInspector.displayNameForURL(m.u rl) + ":" + m.line + " " + m.messageText); | |
vsevik
2014/04/30 10:23:57
Let's use InspectorTest.dumpConsoleMessages instea
| |
31 } | |
32 else | |
33 InspectorTest.addResult("FAILED: bad messages count"); | |
34 | |
35 InspectorTest.addResult("TEST COMPLETE"); | |
36 InspectorTest.completeTest(); | |
37 } | |
38 </script> | |
39 </head> | |
40 <body onload="onload()"> | |
41 <p>Tests that when exception happens before inspector is open source url is corr ectly shown in console.</p> | |
42 </body> | |
43 </html> | |
OLD | NEW |