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

Unified Diff: test/inspector/inspector-test.cc

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 | « test/inspector/debugger/collect-obsolete-async-tasks-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/inspector-test.cc
diff --git a/test/inspector/inspector-test.cc b/test/inspector/inspector-test.cc
index f3badacacc23adb9db14d739399730d1cd149a21..0368f85f1e6804a007c1f771dfa0ff7fba1cbd4e 100644
--- a/test/inspector/inspector-test.cc
+++ b/test/inspector/inspector-test.cc
@@ -439,6 +439,7 @@ class InspectorExtension : public v8::Extension {
"native function attachInspector();"
"native function detachInspector();"
"native function setMaxAsyncTaskStacks();"
+ "native function dumpAsyncTaskStacksStateForTest();"
"native function breakProgram();"
"native function createObjectWithStrictCheck();"
"native function callWithScheduledBreak();"
@@ -467,6 +468,14 @@ class InspectorExtension : public v8::Extension {
return v8::FunctionTemplate::New(
isolate, InspectorExtension::SetMaxAsyncTaskStacks);
} else if (name->Equals(context,
+ v8::String::NewFromUtf8(
+ isolate, "dumpAsyncTaskStacksStateForTest",
+ v8::NewStringType::kNormal)
+ .ToLocalChecked())
+ .FromJust()) {
+ return v8::FunctionTemplate::New(
+ isolate, InspectorExtension::DumpAsyncTaskStacksStateForTest);
+ } else if (name->Equals(context,
v8::String::NewFromUtf8(isolate, "breakProgram",
v8::NewStringType::kNormal)
.ToLocalChecked())
@@ -538,6 +547,19 @@ class InspectorExtension : public v8::Extension {
inspector, args[0].As<v8::Int32>()->Value());
}
+ static void DumpAsyncTaskStacksStateForTest(
+ const v8::FunctionCallbackInfo<v8::Value>& args) {
+ if (args.Length() != 0) {
+ fprintf(stderr, "Internal error: dumpAsyncTaskStacksStateForTest().");
+ Exit();
+ }
+ v8_inspector::V8Inspector* inspector =
+ InspectorClientImpl::InspectorFromContext(
+ args.GetIsolate()->GetCurrentContext());
+ CHECK(inspector);
+ v8_inspector::DumpAsyncTaskStacksStateForTest(inspector);
+ }
+
static void BreakProgram(const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() != 2 || !args[0]->IsString() || !args[1]->IsString()) {
fprintf(stderr, "Internal error: breakProgram('reason', 'details').");
« no previous file with comments | « test/inspector/debugger/collect-obsolete-async-tasks-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698