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( |