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

Unified Diff: test/cctest/test-debug.cc

Issue 1036863002: Debugger: remove debug command API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test Created 5 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/cctest/test-api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index 5929379663103208e80375734c5c3cf9e036d977..38bf2dd0d64f37c1bc94ea21b25cc885d69e3ebd 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -6943,80 +6943,6 @@ TEST(DebugEventContext) {
}
-static void* expected_break_data;
-static bool was_debug_break_called;
-static bool was_debug_event_called;
-static void DebugEventBreakDataChecker(const v8::Debug::EventDetails& details) {
- if (details.GetEvent() == v8::BreakForCommand) {
- CHECK_EQ(expected_break_data, details.GetClientData());
- was_debug_event_called = true;
- } else if (details.GetEvent() == v8::Break) {
- was_debug_break_called = true;
- }
-}
-
-
-// Check that event details contain context where debug event occured.
-TEST(DebugEventBreakData) {
- DebugLocalContext env;
- v8::Isolate* isolate = env->GetIsolate();
- v8::HandleScope scope(isolate);
- v8::Debug::SetDebugEventListener(DebugEventBreakDataChecker);
-
- TestClientData::constructor_call_counter = 0;
- TestClientData::destructor_call_counter = 0;
-
- expected_break_data = NULL;
- was_debug_event_called = false;
- was_debug_break_called = false;
- v8::Debug::DebugBreakForCommand(isolate, NULL);
- v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
- "(function(x){return x;})(1);"))
- ->Run();
- CHECK(was_debug_event_called);
- CHECK(!was_debug_break_called);
-
- TestClientData* data1 = new TestClientData();
- expected_break_data = data1;
- was_debug_event_called = false;
- was_debug_break_called = false;
- v8::Debug::DebugBreakForCommand(isolate, data1);
- v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
- "(function(x){return x+1;})(1);"))
- ->Run();
- CHECK(was_debug_event_called);
- CHECK(!was_debug_break_called);
-
- expected_break_data = NULL;
- was_debug_event_called = false;
- was_debug_break_called = false;
- v8::Debug::DebugBreak(isolate);
- v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
- "(function(x){return x+2;})(1);"))
- ->Run();
- CHECK(!was_debug_event_called);
- CHECK(was_debug_break_called);
-
- TestClientData* data2 = new TestClientData();
- expected_break_data = data2;
- was_debug_event_called = false;
- was_debug_break_called = false;
- v8::Debug::DebugBreak(isolate);
- v8::Debug::DebugBreakForCommand(isolate, data2);
- v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
- "(function(x){return x+3;})(1);"))
- ->Run();
- CHECK(was_debug_event_called);
- CHECK(was_debug_break_called);
-
- CHECK_EQ(2, TestClientData::constructor_call_counter);
- CHECK_EQ(TestClientData::constructor_call_counter,
- TestClientData::destructor_call_counter);
-
- v8::Debug::SetDebugEventListener(NULL);
- CheckDebuggerUnloaded();
-}
-
static bool debug_event_break_deoptimize_done = false;
static void DebugEventBreakDeoptimize(
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698