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

Unified Diff: runtime/vm/message_handler_test.cc

Issue 629533002: Fix deadlock that can occur while handling service messages at a breakpoint. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « runtime/vm/message_handler.cc ('k') | runtime/vm/message_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/message_handler_test.cc
diff --git a/runtime/vm/message_handler_test.cc b/runtime/vm/message_handler_test.cc
index e40133510396002850fdf7c01db08b236aaed1d3..ccd476fbc986e87fe8b48b41205d14b389403272 100644
--- a/runtime/vm/message_handler_test.cc
+++ b/runtime/vm/message_handler_test.cc
@@ -148,6 +148,27 @@ UNIT_TEST_CASE(MessageHandler_PostMessage) {
}
+UNIT_TEST_CASE(MessageHandler_HasOOBMessages) {
+ TestMessageHandler handler;
+ MessageHandlerTestPeer handler_peer(&handler);
+
+ EXPECT(!handler.HasOOBMessages());
+
+ // Post a normal message.
+ Message* message = new Message(1, NULL, 0, Message::kNormalPriority);
+ handler_peer.PostMessage(message);
+ EXPECT(!handler.HasOOBMessages());
+
+ // Post an oob message.
+ message = new Message(1, NULL, 0, Message::kOOBPriority);
+ handler_peer.PostMessage(message);
+ EXPECT(handler.HasOOBMessages());
+
+ // Delete all pending messages.
+ handler_peer.CloseAllPorts();
+}
+
+
UNIT_TEST_CASE(MessageHandler_ClosePort) {
TestMessageHandler handler;
MessageHandlerTestPeer handler_peer(&handler);
« no previous file with comments | « runtime/vm/message_handler.cc ('k') | runtime/vm/message_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698