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

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

Issue 220903002: DevTools: wrap DebuggerAgent.Location with DebuggerModel.Location. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: All tests!!! Created 6 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
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 var images = [ document.createElement("img"), document.createElement("img"), doc ument.createElement("img"), document.createElement("img") ]; 7 var images = [ document.createElement("img"), document.createElement("img"), doc ument.createElement("img"), document.createElement("img") ];
8 8
9 function testFunction() 9 function testFunction()
10 { 10 {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 InspectorTest.setQuiet(true); 107 InspectorTest.setQuiet(true);
108 InspectorTest.startDebuggerTest(step1); 108 InspectorTest.startDebuggerTest(step1);
109 109
110 function step1() 110 function step1()
111 { 111 {
112 DebuggerAgent.setAsyncCallStackDepth(0, step2); 112 DebuggerAgent.setAsyncCallStackDepth(0, step2);
113 } 113 }
114 114
115 function step2() 115 function step2()
116 { 116 {
117 InspectorTest.runTestFunctionAndWaitUntilPaused(didPaused); 117 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
118 } 118 }
119 119
120 function resumeExecution() 120 function resumeExecution()
121 { 121 {
122 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(Inspect orTest, didPaused)); 122 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(Inspect orTest, didPause));
123 } 123 }
124 124
125 var step = 0; 125 var step = 0;
126 var callStacksOutput = []; 126 var callStacksOutput = [];
127 function didPaused(callFrames, reason, breakpointIds, asyncStackTrace) 127 function didPause(callFrames, reason, breakpointIds, asyncStackTrace)
128 { 128 {
129 ++step; 129 ++step;
130 if (step === 1) { 130 if (step === 1) {
131 DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDepth, resumeE xecution); 131 DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDepth, resumeE xecution);
132 return; 132 return;
133 } 133 }
134 134
135 callStacksOutput.push(InspectorTest.captureStackTraceIntoString(callFram es, asyncStackTrace) + "\n"); 135 callStacksOutput.push(InspectorTest.captureStackTraceIntoString(callFram es, asyncStackTrace) + "\n");
136 if (step < totalDebuggerStatements) { 136 if (step < totalDebuggerStatements) {
137 resumeExecution(); 137 resumeExecution();
138 } else { 138 } else {
139 InspectorTest.addResult("Captured call stacks in no particular order :"); 139 InspectorTest.addResult("Captured call stacks in no particular order :");
140 callStacksOutput.sort(); 140 callStacksOutput.sort();
141 InspectorTest.addResults(callStacksOutput); 141 InspectorTest.addResults(callStacksOutput);
142 InspectorTest.completeDebuggerTest(); 142 InspectorTest.completeDebuggerTest();
143 } 143 }
144 } 144 }
145 } 145 }
146 146
147 </script> 147 </script>
148 </head> 148 </head>
149 149
150 <body onload="runTest()"> 150 <body onload="runTest()">
151 <p> 151 <p>
152 Tests that capturing asynchronous call stacks in debugger works if started after some time since the page loads. 152 Tests that capturing asynchronous call stacks in debugger works if started after some time since the page loads.
153 </p> 153 </p>
154 154
155 </body> 155 </body>
156 </html> 156 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698