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

Side by Side Diff: test/inspector/debugger/collect-obsolete-async-tasks.js

Issue 2832723004: [test/inspector] remove any usage of v8::Extension (Closed)
Patch Set: ac Created 3 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
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 InspectorTest.log('Checks that we collect obsolete async tasks with async stacks .');
6 6
7 InspectorTest.addScript(` 7 InspectorTest.addScript(`
8 function test() { 8 function test() {
9 setMaxAsyncTaskStacks(128); 9 inspector.setMaxAsyncTaskStacks(128);
10 var p = Promise.resolve(); 10 var p = Promise.resolve();
11 11
12 dumpAsyncTaskStacksStateForTest(); 12 inspector.dumpAsyncTaskStacksStateForTest();
13 setMaxAsyncTaskStacks(128); 13 inspector.setMaxAsyncTaskStacks(128);
14 dumpAsyncTaskStacksStateForTest(); 14 inspector.dumpAsyncTaskStacksStateForTest();
15 15
16 p.then(() => 42).then(() => 239); 16 p.then(() => 42).then(() => 239);
17 17
18 dumpAsyncTaskStacksStateForTest(); 18 inspector.dumpAsyncTaskStacksStateForTest();
19 setMaxAsyncTaskStacks(128); 19 inspector.setMaxAsyncTaskStacks(128);
20 dumpAsyncTaskStacksStateForTest(); 20 inspector.dumpAsyncTaskStacksStateForTest();
21 21
22 setTimeout(() => 42, 0); 22 setTimeout(() => 42, 0);
23 23
24 dumpAsyncTaskStacksStateForTest(); 24 inspector.dumpAsyncTaskStacksStateForTest();
25 setMaxAsyncTaskStacks(128); 25 inspector.setMaxAsyncTaskStacks(128);
26 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

Powered by Google App Engine
This is Rietveld 408576698