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

Side by Side Diff: test/inspector/debugger/promise-chain-when-limit-hit.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 // TODO(kozyatinskiy): fix or remove it later. 5 // TODO(kozyatinskiy): fix or remove it later.
6 let {session, contextGroup, Protocol} = InspectorTest.start('Tests how async pro mise chains behave when reaching the limit of stacks');
7
5 (async function test(){ 8 (async function test(){
6 InspectorTest.log('Checks correctness of promise chains when limit hit'); 9 InspectorTest.log('Checks correctness of promise chains when limit hit');
7 await Protocol.Runtime.enable(); 10 await Protocol.Runtime.enable();
8 await Protocol.Debugger.enable(); 11 await Protocol.Debugger.enable();
9 Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128}); 12 Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
10 13
11 await setMaxAsyncTaskStacks(3); 14 await setMaxAsyncTaskStacks(3);
12 runWithAsyncChainPromise(3, 'console.trace()'); 15 runWithAsyncChainPromise(3, 'console.trace()');
13 InspectorTest.logMessage(await Protocol.Runtime.onceConsoleAPICalled()); 16 InspectorTest.logMessage(await Protocol.Runtime.onceConsoleAPICalled());
14 17
(...skipping 27 matching lines...) Expand all
42 Protocol.Runtime.evaluate({ 45 Protocol.Runtime.evaluate({
43 expression: `Promise.resolve()${then.repeat(len - 1)}${pause}` 46 expression: `Promise.resolve()${then.repeat(len - 1)}${pause}`
44 }); 47 });
45 } 48 }
46 49
47 async function setMaxAsyncTaskStacks(max) { 50 async function setMaxAsyncTaskStacks(max) {
48 let expression = `inspector.setMaxAsyncTaskStacks(${max})`; 51 let expression = `inspector.setMaxAsyncTaskStacks(${max})`;
49 InspectorTest.log(expression); 52 InspectorTest.log(expression);
50 await Protocol.Runtime.evaluate({expression}); 53 await Protocol.Runtime.evaluate({expression});
51 } 54 }
OLDNEW
« no previous file with comments | « test/inspector/debugger/pause-on-oom.js ('k') | test/inspector/debugger/promise-chain-when-limit-hit-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698