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

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

Issue 2819423005: [inspector] removed kDebugPromiseCollected event (Closed)
Patch Set: added a test 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | test/inspector/debugger/collect-obsolete-async-tasks-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/debugger/collect-obsolete-async-tasks.js
diff --git a/test/inspector/debugger/collect-obsolete-async-tasks.js b/test/inspector/debugger/collect-obsolete-async-tasks.js
new file mode 100644
index 0000000000000000000000000000000000000000..5e54eb014bc60775bf0dfa307acd4e78e8387f13
--- /dev/null
+++ b/test/inspector/debugger/collect-obsolete-async-tasks.js
@@ -0,0 +1,35 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+InspectorTest.log('Checks that we collect obsolete async tasks with async stacks.');
+
+InspectorTest.addScript(`
+function test() {
+ setMaxAsyncTaskStacks(128);
+ var p = Promise.resolve();
+
+ dumpAsyncTaskStacksStateForTest();
+ setMaxAsyncTaskStacks(128);
+ dumpAsyncTaskStacksStateForTest();
+
+ p.then(() => 42).then(() => 239);
+
+ dumpAsyncTaskStacksStateForTest();
+ setMaxAsyncTaskStacks(128);
+ dumpAsyncTaskStacksStateForTest();
+
+ setTimeout(() => 42, 0);
+
+ dumpAsyncTaskStacksStateForTest();
+ setMaxAsyncTaskStacks(128);
+ dumpAsyncTaskStacksStateForTest();
+}
+`);
+
+(async function test() {
+ Protocol.Debugger.enable();
+ Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
+ await Protocol.Runtime.evaluate({expression: 'test()'});
+ InspectorTest.completeTest();
+})()
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | test/inspector/debugger/collect-obsolete-async-tasks-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698