| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 InspectorTest.addSniffer(WebInspector.SourceFrame.prototype, "ad
dMessageToSource", didAddMessage); | 51 InspectorTest.addSniffer(WebInspector.SourceFrame.prototype, "ad
dMessageToSource", didAddMessage); |
| 52 InspectorTest.addSniffer(WebInspector.SourceFrame.prototype, "cl
earMessages", clearMessages); | 52 InspectorTest.addSniffer(WebInspector.SourceFrame.prototype, "cl
earMessages", 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.messageText()); |
| 61 WebInspector.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 } |
| 71 }, | 71 }, |
| 72 | 72 |
| 73 function testShowResource(next) | 73 function testShowResource(next) |
| 74 { | 74 { |
| 75 WebInspector.NetworkPanel.show(); | 75 WebInspector.NetworkPanel.show(); |
| 76 | 76 |
| 77 InspectorTest.addSniffer(WebInspector.SourceFrame.prototype, "show",
didShowSourceFrame); | 77 InspectorTest.addSniffer(WebInspector.SourceFrame.prototype, "show",
didShowSourceFrame); |
| 78 | 78 |
| 79 WebInspector.resourceTreeModel.forAllResources(visit); | 79 InspectorTest.resourceTreeModel.forAllResources(visit); |
| 80 function visit(resource) | 80 function visit(resource) |
| 81 { | 81 { |
| 82 if (resource.url.indexOf("debugger-test.js") !== -1) { | 82 if (resource.url.indexOf("debugger-test.js") !== -1) { |
| 83 WebInspector.panels.resources.showResource(resource, 1); | 83 WebInspector.panels.resources.showResource(resource, 1); |
| 84 return true; | 84 return true; |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 function didShowSourceFrame() | 88 function didShowSourceFrame() |
| 89 { | 89 { |
| 90 next(); | 90 next(); |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 ]); | 93 ]); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 </script> | 96 </script> |
| 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 |