| 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/console-test.js"></script> | 4 <script src="../../../http/tests/inspector/console-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 6 <script src="../../../http/tests/inspector/network-test.js"></script> | 6 <script src="../../../http/tests/inspector/network-test.js"></script> |
| 7 <script src="../../../http/tests/inspector/resources-test.js"></script> | 7 <script src="../../../http/tests/inspector/resources-test.js"></script> |
| 8 <script> | 8 <script> |
| 9 function addErrorToConsole() | 9 function addErrorToConsole() |
| 10 { | 10 { |
| 11 console.error("test error message"); | 11 console.error("test error message"); |
| 12 } | 12 } |
| 13 | 13 |
| 14 function methodForBreakpoint() | 14 function methodForBreakpoint() |
| 15 { | 15 { |
| 16 alert("Hello world"); | 16 alert("Hello world"); |
| 17 } | 17 } |
| 18 | 18 |
| 19 function test() | 19 function test() |
| 20 { | 20 { |
| 21 WebInspector.ResourcesPanel.show(); | 21 WebInspector.viewManager.showView("resources"); |
| 22 InspectorTest.runDebuggerTestSuite([ | 22 InspectorTest.runDebuggerTestSuite([ |
| 23 function testSetBreakpoint(next) | 23 function testSetBreakpoint(next) |
| 24 { | 24 { |
| 25 InspectorTest.showScriptSource("source-frame.html", didShowScriptSou
rce); | 25 InspectorTest.showScriptSource("source-frame.html", didShowScriptSou
rce); |
| 26 | 26 |
| 27 function didShowScriptSource(sourceFrame) | 27 function didShowScriptSource(sourceFrame) |
| 28 { | 28 { |
| 29 InspectorTest.addResult("Script source was shown."); | 29 InspectorTest.addResult("Script source was shown."); |
| 30 InspectorTest.addSniffer(WebInspector.JavaScriptSourceFrame.prot
otype, "_addBreakpointDecoration", didAddBreakpoint); | 30 InspectorTest.addSniffer(WebInspector.JavaScriptSourceFrame.prot
otype, "_addBreakpointDecoration", didAddBreakpoint); |
| 31 InspectorTest.setBreakpoint(sourceFrame, 14, "", true); | 31 InspectorTest.setBreakpoint(sourceFrame, 14, "", true); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 { | 64 { |
| 65 if (this !== shownSourceFrame) | 65 if (this !== shownSourceFrame) |
| 66 return; | 66 return; |
| 67 InspectorTest.addResult("Message removed from source frame: " +
message.text()); | 67 InspectorTest.addResult("Message removed from source frame: " +
message.text()); |
| 68 next(); | 68 next(); |
| 69 } | 69 } |
| 70 }, | 70 }, |
| 71 | 71 |
| 72 function testShowResource(next) | 72 function testShowResource(next) |
| 73 { | 73 { |
| 74 WebInspector.NetworkPanel.show(); | 74 WebInspector.viewManager.showView("network"); |
| 75 | |
| 76 InspectorTest.addSniffer(WebInspector.SourceFrame.prototype, "show",
didShowSourceFrame); | 75 InspectorTest.addSniffer(WebInspector.SourceFrame.prototype, "show",
didShowSourceFrame); |
| 77 | 76 |
| 78 InspectorTest.resourceTreeModel.forAllResources(visit); | 77 InspectorTest.resourceTreeModel.forAllResources(visit); |
| 79 function visit(resource) | 78 function visit(resource) |
| 80 { | 79 { |
| 81 if (resource.url.indexOf("debugger-test.js") !== -1) { | 80 if (resource.url.indexOf("debugger-test.js") !== -1) { |
| 82 WebInspector.panels.resources.showResource(resource, 1); | 81 WebInspector.panels.resources.showResource(resource, 1); |
| 83 return true; | 82 return true; |
| 84 } | 83 } |
| 85 } | 84 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 96 | 95 |
| 97 </head> | 96 </head> |
| 98 | 97 |
| 99 <body onload="runTest()"> | 98 <body onload="runTest()"> |
| 100 <p>Tests that it's possible to set breakpoint in source frame, and that | 99 <p>Tests that it's possible to set breakpoint in source frame, and that |
| 101 source frame displays breakpoints and console errors. | 100 source frame displays breakpoints and console errors. |
| 102 </p> | 101 </p> |
| 103 | 102 |
| 104 </body> | 103 </body> |
| 105 </html> | 104 </html> |
| OLD | NEW |