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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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>
OLDNEW
« 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