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

Side by Side Diff: test/inspector/debugger/set-async-call-stack-depth.js

Issue 2891213002: [inspector] Refactor protocol-test.js (Closed)
Patch Set: comments addressed Created 3 years, 7 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
OLDNEW
1 // Copyright 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO(kozyatinskiy): fix or remove it later with new stack traces it's almost 5 // TODO(kozyatinskiy): fix or remove it later with new stack traces it's almost
6 // imposible to hit limit. 6 // imposible to hit limit.
7 InspectorTest.log('Checks that we report not more then maxDepth call chains.'); 7 let {session, contextGroup, Protocol} = InspectorTest.start('Checks that we repo rt not more then maxDepth call chains.');
8 8
9 InspectorTest.addScript(` 9 contextGroup.addScript(`
10 function promisesChain(num) { 10 function promisesChain(num) {
11 var p = Promise.resolve(); 11 var p = Promise.resolve();
12 for (var i = 0; i < num - 1; ++i) { 12 for (var i = 0; i < num - 1; ++i) {
13 p = p.then(() => 42); 13 p = p.then(() => 42);
14 } 14 }
15 return p; 15 return p;
16 } 16 }
17 `); 17 `);
18 18
19 Protocol.Debugger.enable(); 19 Protocol.Debugger.enable();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 function dumpCaptured(stack) { 72 function dumpCaptured(stack) {
73 let count = 0; 73 let count = 0;
74 while (stack) { 74 while (stack) {
75 ++count; 75 ++count;
76 stack = stack.parent; 76 stack = stack.parent;
77 } 77 }
78 InspectorTest.log('reported: ' + count + '\n'); 78 InspectorTest.log('reported: ' + count + '\n');
79 } 79 }
OLDNEW
« no previous file with comments | « test/inspector/debugger/script-parsed-hash-expected.txt ('k') | test/inspector/debugger/set-blackbox-patterns.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698