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

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

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

Powered by Google App Engine
This is Rietveld 408576698