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

Unified Diff: runtime/vm/message_handler_test.cc

Issue 10829444: Avoid trusting the length encoded in the Snapshot if there is an (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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.h ('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
===================================================================
--- runtime/vm/message_handler_test.cc (revision 11409)
+++ runtime/vm/message_handler_test.cc (working copy)
@@ -114,7 +114,7 @@
EXPECT_EQ(0, handler.notify_count());
// Post a message.
- Message* message = new Message(0, 0, NULL, Message::kNormalPriority);
+ Message* message = new Message(0, 0, NULL, 0, Message::kNormalPriority);
handler_peer.PostMessage(message);
// The notify callback is called.
@@ -126,7 +126,7 @@
delete message;
// Post an oob message.
- message = new Message(0, 0, NULL, Message::kOOBPriority);
+ message = new Message(0, 0, NULL, 0, Message::kOOBPriority);
handler_peer.PostMessage(message);
// The notify callback is called.
@@ -142,9 +142,9 @@
UNIT_TEST_CASE(MessageHandler_ClosePort) {
TestMessageHandler handler;
MessageHandlerTestPeer handler_peer(&handler);
- Message* message1 = new Message(1, 0, NULL, Message::kNormalPriority);
+ Message* message1 = new Message(1, 0, NULL, 0, Message::kNormalPriority);
handler_peer.PostMessage(message1);
- Message* message2 = new Message(2, 0, NULL, Message::kNormalPriority);
+ Message* message2 = new Message(2, 0, NULL, 0, Message::kNormalPriority);
handler_peer.PostMessage(message2);
handler_peer.ClosePort(1);
@@ -159,9 +159,9 @@
UNIT_TEST_CASE(MessageHandler_CloseAllPorts) {
TestMessageHandler handler;
MessageHandlerTestPeer handler_peer(&handler);
- Message* message1 = new Message(1, 0, NULL, Message::kNormalPriority);
+ Message* message1 = new Message(1, 0, NULL, 0, Message::kNormalPriority);
handler_peer.PostMessage(message1);
- Message* message2 = new Message(2, 0, NULL, Message::kNormalPriority);
+ Message* message2 = new Message(2, 0, NULL, 0, Message::kNormalPriority);
handler_peer.PostMessage(message2);
handler_peer.CloseAllPorts();
@@ -174,13 +174,13 @@
UNIT_TEST_CASE(MessageHandler_HandleNextMessage) {
TestMessageHandler handler;
MessageHandlerTestPeer handler_peer(&handler);
- Message* message1 = new Message(1, 0, NULL, Message::kNormalPriority);
+ Message* message1 = new Message(1, 0, NULL, 0, Message::kNormalPriority);
handler_peer.PostMessage(message1);
- Message* oob_message1 = new Message(3, 0, NULL, Message::kOOBPriority);
+ Message* oob_message1 = new Message(3, 0, NULL, 0, Message::kOOBPriority);
handler_peer.PostMessage(oob_message1);
- Message* message2 = new Message(2, 0, NULL, Message::kNormalPriority);
+ Message* message2 = new Message(2, 0, NULL, 0, Message::kNormalPriority);
handler_peer.PostMessage(message2);
- Message* oob_message2 = new Message(4, 0, NULL, Message::kOOBPriority);
+ Message* oob_message2 = new Message(4, 0, NULL, 0, Message::kOOBPriority);
handler_peer.PostMessage(oob_message2);
// We handle both oob messages and a single normal message.
@@ -193,13 +193,13 @@
UNIT_TEST_CASE(MessageHandler_HandleOOBMessages) {
TestMessageHandler handler;
MessageHandlerTestPeer handler_peer(&handler);
- Message* message1 = new Message(1, 0, NULL, Message::kNormalPriority);
+ Message* message1 = new Message(1, 0, NULL, 0, Message::kNormalPriority);
handler_peer.PostMessage(message1);
- Message* message2 = new Message(2, 0, NULL, Message::kNormalPriority);
+ Message* message2 = new Message(2, 0, NULL, 0, Message::kNormalPriority);
handler_peer.PostMessage(message2);
- Message* oob_message1 = new Message(3, 0, NULL, Message::kOOBPriority);
+ Message* oob_message1 = new Message(3, 0, NULL, 0, Message::kOOBPriority);
handler_peer.PostMessage(oob_message1);
- Message* oob_message2 = new Message(4, 0, NULL, Message::kOOBPriority);
+ Message* oob_message2 = new Message(4, 0, NULL, 0, Message::kOOBPriority);
handler_peer.PostMessage(oob_message2);
// We handle both oob messages but no normal messages.
@@ -220,7 +220,7 @@
MessageHandler* handler = info->handler;
MessageHandlerTestPeer handler_peer(handler);
for (int i = 0; i < info->count; i++) {
- Message* message = new Message(i + 1, 0, NULL, Message::kNormalPriority);
+ Message* message = new Message(i + 1, 0, NULL, 0, Message::kNormalPriority);
handler_peer.PostMessage(message);
}
}
@@ -240,7 +240,7 @@
TestStartFunction,
TestEndFunction,
reinterpret_cast<uword>(&handler));
- Message* message = new Message(100, 0, NULL, Message::kNormalPriority);
+ Message* message = new Message(100, 0, NULL, 0, Message::kNormalPriority);
handler_peer.PostMessage(message);
// Wait for the first message to be handled.
« no previous file with comments | « runtime/vm/message.h ('k') | runtime/vm/message_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698