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

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

Issue 8909: Added some missing initialization checks to the debugger API.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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
« src/api.cc ('K') | « src/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
===================================================================
--- 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);
+}
« src/api.cc ('K') | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698