Index: test/cctest/test-debug.cc |
=================================================================== |
--- test/cctest/test-debug.cc (revision 636) |
+++ test/cctest/test-debug.cc (working copy) |
@@ -3131,3 +3131,37 @@ |
breakpoints_v8_thread.Join(); |
breakpoints_debugger_thread.Join(); |
} |
+ |
+ |
+static void DummyDebugEventListener(v8::DebugEvent event, |
+ v8::Handle<v8::Object> exec_state, |
+ v8::Handle<v8::Object> event_data, |
+ v8::Handle<v8::Value> data) { |
+} |
+ |
+ |
+TEST(AddDebugEventListenerOnUninitializedVM) { |
+ v8::Debug::AddDebugEventListener(DummyDebugEventListener); |
+} |
+ |
+ |
+static void DummyMessageHandler(const uint16_t* message, int length, void *data) { |
Kasper Lund
2008/10/30 10:09:34
Does this lint?
Søren Thygesen Gjesse
2008/10/30 10:27:02
Sorry, broke the line.
|
+} |
+ |
+ |
+TEST(SetMessageHandlerOnUninitializedVM) { |
+ v8::Debug::SetMessageHandler(DummyMessageHandler); |
+} |
+ |
+ |
+TEST(DebugBreakOnUninitializedVM) { |
+ v8::Debug::DebugBreak(); |
+} |
+ |
+ |
+TEST(SendCommandToUninitializedVM) { |
+ const char* dummy_command = "{}"; |
+ uint16_t dummy_buffer[80]; |
+ int dummy_length = AsciiToUtf16(dummy_command, dummy_buffer); |
+ v8::Debug::SendCommand(dummy_buffer, dummy_length); |
+} |