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

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

Issue 16143005: monitor console command implemented. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed custom bindings. Created 7 years, 6 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 simpleTestFunction2()
16 {
17 return simpleTestFunction3();
18 }
19
20 function simpleTestFunction3()
21 {
22 return 0;
23 }
24 </script>
25
26 <script>
27 var test = function()
28 {
29 var currentSourceFrame;
30 InspectorTest.setQuiet(true);
31 InspectorTest.runDebuggerTestSuite([
32 function testSimpleMonitor(next)
33 {
34 monitorAndRun(next, "simpleTestFunction", "simpleTestFunction();");
35 },
36
37 function testSimpleMonitorWith1Arg(next)
38 {
39 monitorAndRun(next, "simpleTestFunction", "simpleTestFunction(1);");
40 },
41
42 function testSimpleMonitorWithManyArgs(next)
43 {
44 monitorAndRun(next, "simpleTestFunction", "simpleTestFunction(1, 2, 3, 4 ,5);");
45 },
46
47 function testSimpleUnmonitor(next)
48 {
49 InspectorTest.evaluateInConsole("monitor(simpleTestFunction2)");
50 InspectorTest.evaluateInConsole("unmonitor(simpleTestFunction2)");
yurys 2013/06/13 09:46:51 Can you add a test that unmonitor works ok on a fu
SeRya 2013/06/13 10:45:14 Done.
51 monitorAndRun(next, "simpleTestFunction3", "simpleTestFunction2();") ;
52 },
53 ]);
54
55 function monitorAndRun(next, functionName, runCmd)
56 {
57 InspectorTest.evaluateInConsole("monitor(" + functionName + ")");
58 InspectorTest.addResult("Start monitoring function.");
59
60 InspectorTest.evaluateInConsole("setTimeout(function() { " + runCmd + " }, 0)");
61 InspectorTest.addResult("Set timer for test function.");
62 InspectorTest.waitUntilMessageReceived(didReceive);
63
64 function didReceive(message)
65 {
66 InspectorTest.addResult("Console message received: " + message.messa ge);
67 InspectorTest.evaluateInConsole("unmonitor(" + functionName + ")");
68 InspectorTest.addResult("Stop monitoring.");
69 next();
70 }
71 }
72 }
73
74 </script>
75 </head>
76
77 <body onload="runTest()">
78 <p>
79 Tests traceCalls(fn) console command.
80 </p>
81
82 </body>
83 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698