OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
4 <script src="../console-test.js"></script> | 4 <script src="../console-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function loadScript() | 7 function loadScript() |
8 { | 8 { |
9 var script = document.createElement('script'); | 9 var script = document.createElement('script'); |
10 script.type = "text/javascript"; | 10 script.type = "text/javascript"; |
11 script.src = "../resources/source2.js"; | 11 script.src = "../resources/source2.js"; |
12 document.body.appendChild(script); | 12 document.body.appendChild(script); |
13 } | 13 } |
14 | 14 |
15 function test() | 15 function test() |
16 { | 16 { |
17 var mainTarget = WebInspector.targetManager.mainTarget(); | 17 var mainTarget = WebInspector.targetManager.mainTarget(); |
18 var message = new WebInspector.ConsoleMessage(mainTarget, WebInspector.Conso
leMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageLevel.Log, "hello
?", null, " http://127.0.0.1:8000/inspector/resources/source2.js"); | 18 var message = new WebInspector.ConsoleMessage(mainTarget, 0, WebInspector.Co
nsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageLevel.Log, "he
llo?", null, " http://127.0.0.1:8000/inspector/resources/source2.js"); |
19 mainTarget.consoleModel.addMessage(message); | 19 mainTarget.consoleModel.addMessage(message); |
20 mainTarget.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.
ParsedScriptSource, onScriptAdded); | 20 mainTarget.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.
ParsedScriptSource, onScriptAdded); |
21 | 21 |
22 InspectorTest.dumpConsoleMessages(); | 22 InspectorTest.dumpConsoleMessages(); |
23 InspectorTest.evaluateInPage("loadScript()"); | 23 InspectorTest.evaluateInPage("loadScript()"); |
24 | 24 |
25 function onScriptAdded(event) | 25 function onScriptAdded(event) |
26 { | 26 { |
27 if (!event.data.contentURL().endsWith("source2.js")) | 27 if (!event.data.contentURL().endsWith("source2.js")) |
28 return; | 28 return; |
(...skipping 22 matching lines...) Expand all Loading... |
51 | 51 |
52 </script> | 52 </script> |
53 </head> | 53 </head> |
54 | 54 |
55 <body onload="runTest()"> | 55 <body onload="runTest()"> |
56 <p> | 56 <p> |
57 Tests a handling of a click on the link in a message, which had been shown befor
e its originating script was added. | 57 Tests a handling of a click on the link in a message, which had been shown befor
e its originating script was added. |
58 </p> | 58 </p> |
59 </body> | 59 </body> |
60 </html> | 60 </html> |
OLD | NEW |