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); |