OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
5 <script src="../../../http/tests/inspector/network-test.js"></script> | 5 <script src="../../../http/tests/inspector/network-test.js"></script> |
6 <script src="../../../http/tests/inspector/resources-test.js"></script> | 6 <script src="../../../http/tests/inspector/resources-test.js"></script> |
7 | 7 |
8 <script> | 8 <script> |
9 | 9 |
10 function addErrorToConsole() | 10 function addErrorToConsole() |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 function testConsoleMessage(next) | 42 function testConsoleMessage(next) |
43 { | 43 { |
44 InspectorTest.showScriptSource("source-frame.html", didShowScriptSou
rce); | 44 InspectorTest.showScriptSource("source-frame.html", didShowScriptSou
rce); |
45 | 45 |
46 var shownSourceFrame; | 46 var shownSourceFrame; |
47 function didShowScriptSource(sourceFrame) | 47 function didShowScriptSource(sourceFrame) |
48 { | 48 { |
49 InspectorTest.addResult("Script source was shown."); | 49 InspectorTest.addResult("Script source was shown."); |
50 shownSourceFrame = sourceFrame; | 50 shownSourceFrame = sourceFrame; |
51 InspectorTest.addSniffer(WebInspector.SourceFrame.prototype, "ad
dMessageToSource", didAddMessage); | 51 InspectorTest.addSniffer(WebInspector.UISourceCodeFrame.prototyp
e, "addMessageToSource", didAddMessage); |
52 InspectorTest.addSniffer(WebInspector.SourceFrame.prototype, "cl
earMessages", clearMessages); | 52 InspectorTest.addSniffer(WebInspector.UISourceCodeFrame.prototyp
e, "clearMessages", clearMessages); |
53 InspectorTest.evaluateInPage("addErrorToConsole()"); | 53 InspectorTest.evaluateInPage("addErrorToConsole()"); |
54 } | 54 } |
55 | 55 |
56 function didAddMessage(message) | 56 function didAddMessage(message) |
57 { | 57 { |
58 if (this !== shownSourceFrame) | 58 if (this !== shownSourceFrame) |
59 return; | 59 return; |
60 InspectorTest.addResult("Message added to source frame: " + mess
age.messageText()); | 60 InspectorTest.addResult("Message added to source frame: " + mess
age.text()); |
61 InspectorTest.consoleModel.requestClearMessages(); | 61 InspectorTest.consoleModel.requestClearMessages(); |
62 } | 62 } |
63 | 63 |
64 function clearMessages() | 64 function clearMessages() |
65 { | 65 { |
66 if (this !== shownSourceFrame) | 66 if (this !== shownSourceFrame) |
67 return; | 67 return; |
68 InspectorTest.addResult("Messages cleared in source frame."); | 68 InspectorTest.addResult("Messages cleared in source frame."); |
69 next(); | 69 next(); |
70 } | 70 } |
(...skipping 26 matching lines...) Expand all Loading... |
97 | 97 |
98 </head> | 98 </head> |
99 | 99 |
100 <body onload="runTest()"> | 100 <body onload="runTest()"> |
101 <p>Tests that it's possible to set breakpoint in source frame, and that | 101 <p>Tests that it's possible to set breakpoint in source frame, and that |
102 source frame displays breakpoints and console errors. | 102 source frame displays breakpoints and console errors. |
103 </p> | 103 </p> |
104 | 104 |
105 </body> | 105 </body> |
106 </html> | 106 </html> |
OLD | NEW |