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

Side by Side Diff: LayoutTests/inspector/debugger/debug-console-command.html

Issue 14294004: Implementing console command 'debug'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months 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 | Annotate | Revision Log
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/console-test.js"></script>
6
7 <script>
8 function simpleTestFunction()
9 {
10 return 0;
11 }
12 </script>
13
14 <script>
15 function simpleTestFunction1() { return 0; } function simpleTestFunction2() { re turn 0; }
16 </script>
17
18 <script>
19 var test = function()
20 {
21 var currentSourceFrame;
22 InspectorTest.setQuiet(true);
23 InspectorTest.runDebuggerTestSuite([
24 function testSetSimpleBreakpoint(next)
25 {
26 setBreakpointAndRun(next, "simpleTestFunction", "simpleTestFunction( );");
27 },
28
29 function testSetBreakpointOnFirstFunctionInLine(next)
30 {
31 setBreakpointAndRun(next, "simpleTestFunction1", "simpleTestFunction 2(); simpleTestFunction1();");
32 },
33
34 function testSetBreakpointOnLastFunctionInLine(next)
35 {
36 setBreakpointAndRun(next, "simpleTestFunction2", "simpleTestFunction 1(); simpleTestFunction2();");
37 },
38 ]);
39
40 function setBreakpointAndRun(next, functionName, runCmd)
41 {
42 InspectorTest.evaluateInConsole("debug(" + functionName + ")");
43
44 InspectorTest.addResult("Breakpoint added.");
45 InspectorTest.evaluateInConsole("setTimeout(function() { " + runCmd + " }, 0)");
46 InspectorTest.addResult("Set timer for test function.");
47 InspectorTest.waitUntilPaused(didPause);
48
49 function didPause(callFrames)
50 {
51 InspectorTest.addResult("Script execution paused.");
52 InspectorTest.captureStackTrace(callFrames);
53 InspectorTest.evaluateInConsole("undebug(" + functionName + ")");
54 InspectorTest.addResult("Breakpoint removed.");
55 InspectorTest.resumeExecution(didResume);
56 }
57
58 function didResume()
59 {
60 InspectorTest.addResult("Script execution resumed.");
61 next();
62 }
63 }
64 }
65
66 </script>
67 </head>
68
69 <body onload="runTest()">
70 <p>
71 Tests debug(fn) console command.
72 </p>
73
74 </body>
75 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698