| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/workspace-test.js"></script> |
| 6 <script> |
| 7 function test() |
| 8 { |
| 9 WebInspector.targetManager.mainTarget().setIsNodeJSForTest(); |
| 10 InspectorTest.startDebuggerTest(); |
| 11 |
| 12 var functionText = "function foobar() { \nconsole.log('foobar execute!');\n}
"; |
| 13 var sourceURL = "\n//# sourceURL=/usr/local/home/prog/foobar.js"; |
| 14 InspectorTest.evaluateInPage(functionText + sourceURL, function() { }); |
| 15 InspectorTest.showScriptSource("foobar.js", didShowScriptSource); |
| 16 |
| 17 function didShowScriptSource(sourceFrame) |
| 18 { |
| 19 InspectorTest.addResult("Setting breakpoint:"); |
| 20 InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBreakpoint
.prototype, "_addResolvedLocation", breakpointResolved); |
| 21 InspectorTest.setBreakpoint(sourceFrame, 1, "", true); |
| 22 } |
| 23 |
| 24 function breakpointResolved(location) |
| 25 { |
| 26 InspectorTest.waitUntilPaused(paused); |
| 27 InspectorTest.evaluateInPage("foobar()"); |
| 28 } |
| 29 |
| 30 function paused() |
| 31 { |
| 32 InspectorTest.addResult("Successfully paused on breakpoint"); |
| 33 InspectorTest.completeDebuggerTest(); |
| 34 } |
| 35 } |
| 36 </script> |
| 37 </head> |
| 38 <body onload="runTest()"> |
| 39 <p>Verify that front-end is able to set breakpoint for node.js scripts.</p> |
| 40 </body> |
| 41 </html> |
| OLD | NEW |