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

Side by Side Diff: LayoutTests/inspector/debugger/async-callstack.html

Issue 118293002: DevTools: Support XHR async call stacks in the debugger. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 7 years 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
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> 5 <script>
6 6
7 function testFunction() 7 function testFunction()
8 { 8 {
9 function innerTestFunction() 9 function innerTestFunction()
10 { 10 {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 function imageClickHandlerSync() 74 function imageClickHandlerSync()
75 { 75 {
76 debugger; // synchronous call => should have same async call chain as for ti meout3() 76 debugger; // synchronous call => should have same async call chain as for ti meout3()
77 } 77 }
78 78
79 var test = function() 79 var test = function()
80 { 80 {
81 var totalDebuggerStatements = 10; 81 var totalDebuggerStatements = 10;
82 var maxAsyncCallStackDepth = 4; 82 var maxAsyncCallStackDepth = 4;
83 83 InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallSt ackDepth);
84 InspectorTest.setQuiet(true);
85 InspectorTest.startDebuggerTest(step1);
86
87 function step1()
88 {
89 DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDepth, step2);
90 }
91
92 function step2()
93 {
94 InspectorTest.runTestFunctionAndWaitUntilPaused(didPaused);
95 }
96
97 var step = 0;
98 var callStacksOutput = [];
99 function didPaused(callFrames, reason, breakpointIds, asyncStackTrace)
100 {
101 ++step;
102 InspectorTest.beginResultBufferring();
103 InspectorTest.captureStackTrace(callFrames, asyncStackTrace);
104 callStacksOutput.push(InspectorTest.endResultBufferring());
105
106 if (step < totalDebuggerStatements) {
107 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(Ins pectorTest, didPaused));
108 } else {
109 InspectorTest.addResult("Captured call stacks in no particular order :");
110 callStacksOutput.sort();
111 InspectorTest.addResults(callStacksOutput);
112 InspectorTest.completeDebuggerTest();
113 }
114 }
115 } 84 }
116 85
117 </script> 86 </script>
118 </head> 87 </head>
119 88
120 <body onload="runTest()"> 89 <body onload="runTest()">
121 <p> 90 <p>
122 Tests asynchronous call stacks in debugger. 91 Tests asynchronous call stacks in debugger.
123 </p> 92 </p>
124 <img id="image" onerror="imageErrorHandler()"></img> 93 <img id="image" onerror="imageErrorHandler()"></img>
125 94
126 </body> 95 </body>
127 </html> 96 </html>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/inspector/inspector-test.js ('k') | LayoutTests/inspector/debugger/async-callstack-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698