| Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/nodejs-set-breakpoint.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/nodejs-set-breakpoint.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/nodejs-set-breakpoint.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..12378b967c5e9b9fba8b652fadfcffa441b8e341
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/nodejs-set-breakpoint.html
|
| @@ -0,0 +1,41 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../../http/tests/inspector/debugger-test.js"></script>
|
| +<script src="../../../http/tests/inspector/workspace-test.js"></script>
|
| +<script>
|
| +function test()
|
| +{
|
| + WebInspector.targetManager.mainTarget().setIsNodeJSForTest();
|
| + InspectorTest.startDebuggerTest();
|
| +
|
| + var functionText = "function foobar() { \nconsole.log('foobar execute!');\n}";
|
| + var sourceURL = "\n//# sourceURL=/usr/local/home/prog/foobar.js";
|
| + InspectorTest.evaluateInPage(functionText + sourceURL, function() { });
|
| + InspectorTest.showScriptSource("foobar.js", didShowScriptSource);
|
| +
|
| + function didShowScriptSource(sourceFrame)
|
| + {
|
| + InspectorTest.addResult("Setting breakpoint:");
|
| + InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBreakpoint.prototype, "_addResolvedLocation", breakpointResolved);
|
| + InspectorTest.setBreakpoint(sourceFrame, 1, "", true);
|
| + }
|
| +
|
| + function breakpointResolved(location)
|
| + {
|
| + InspectorTest.waitUntilPaused(paused);
|
| + InspectorTest.evaluateInPage("foobar()");
|
| + }
|
| +
|
| + function paused()
|
| + {
|
| + InspectorTest.addResult("Successfully paused on breakpoint");
|
| + InspectorTest.completeDebuggerTest();
|
| + }
|
| +}
|
| +</script>
|
| +</head>
|
| +<body onload="runTest()">
|
| +<p>Verify that front-end is able to set breakpoint for node.js scripts.</p>
|
| +</body>
|
| +</html>
|
|
|