Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/nodejs-set-breakpoint.html

Issue 2477483002: DevTools: fix breakpoints in Node.js (Closed)
Patch Set: add test Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/nodejs-set-breakpoint-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/nodejs-set-breakpoint-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698