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

Side by Side Diff: test/inspector/debugger/collect-obsolete-async-tasks.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 InspectorTest.log('Checks that we collect obsolete async tasks with async stacks .'); 5 let {session, contextGroup, Protocol} = InspectorTest.start('Checks that we coll ect obsolete async tasks with async stacks.');
6 6
7 InspectorTest.addScript(` 7 contextGroup.addScript(`
8 function test() { 8 function test() {
9 inspector.setMaxAsyncTaskStacks(128); 9 inspector.setMaxAsyncTaskStacks(128);
10 var p = Promise.resolve(); 10 var p = Promise.resolve();
11 11
12 inspector.dumpAsyncTaskStacksStateForTest(); 12 inspector.dumpAsyncTaskStacksStateForTest();
13 inspector.setMaxAsyncTaskStacks(128); 13 inspector.setMaxAsyncTaskStacks(128);
14 inspector.dumpAsyncTaskStacksStateForTest(); 14 inspector.dumpAsyncTaskStacksStateForTest();
15 15
16 p.then(() => 42).then(() => 239); 16 p.then(() => 42).then(() => 239);
17 17
18 inspector.dumpAsyncTaskStacksStateForTest(); 18 inspector.dumpAsyncTaskStacksStateForTest();
19 inspector.setMaxAsyncTaskStacks(128); 19 inspector.setMaxAsyncTaskStacks(128);
20 inspector.dumpAsyncTaskStacksStateForTest(); 20 inspector.dumpAsyncTaskStacksStateForTest();
21 21
22 setTimeout(() => 42, 0); 22 setTimeout(() => 42, 0);
23 23
24 inspector.dumpAsyncTaskStacksStateForTest(); 24 inspector.dumpAsyncTaskStacksStateForTest();
25 inspector.setMaxAsyncTaskStacks(128); 25 inspector.setMaxAsyncTaskStacks(128);
26 inspector.dumpAsyncTaskStacksStateForTest(); 26 inspector.dumpAsyncTaskStacksStateForTest();
27 } 27 }
28 `); 28 `);
29 29
30 (async function test() { 30 (async function test() {
31 Protocol.Debugger.enable(); 31 Protocol.Debugger.enable();
32 Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128}); 32 Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
33 await Protocol.Runtime.evaluate({expression: 'test()'}); 33 await Protocol.Runtime.evaluate({expression: 'test()'});
34 InspectorTest.completeTest(); 34 InspectorTest.completeTest();
35 })() 35 })()
OLDNEW
« no previous file with comments | « test/inspector/debugger/caught-uncaught-exceptions.js ('k') | test/inspector/debugger/collect-old-async-call-chains.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698