| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdio.h> | 5 #include <stdio.h> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/platform_thread.h" | 10 #include "base/platform_thread.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 EXPECT_TRUE(m.WriteInt64(1)); | 91 EXPECT_TRUE(m.WriteInt64(1)); |
| 92 EXPECT_TRUE(m.WriteInt64(2)); | 92 EXPECT_TRUE(m.WriteInt64(2)); |
| 93 | 93 |
| 94 std::vector<int64> vec; | 94 std::vector<int64> vec; |
| 95 void* iter = 0; | 95 void* iter = 0; |
| 96 EXPECT_FALSE(ReadParam(&m, &iter, &vec)); | 96 EXPECT_FALSE(ReadParam(&m, &iter, &vec)); |
| 97 } | 97 } |
| 98 | 98 |
| 99 // We don't actually use the messages defined in this file, but we do this | 99 // We don't actually use the messages defined in this file, but we do this |
| 100 // to get to the IPC macros. | 100 // to get to the IPC macros. |
| 101 #define MESSAGES_INTERNAL_FILE "ipc/ipc_sync_message_unittest.h" | 101 #include "ipc/ipc_sync_message_unittest.h" |
| 102 #include "ipc/ipc_message_macros.h" | |
| 103 | 102 |
| 104 enum IPCMessageIds { | 103 enum IPCMessageIds { |
| 105 UNUSED_IPC_TYPE, | 104 UNUSED_IPC_TYPE, |
| 106 SERVER_FIRST_IPC_TYPE, // 1st Test message tag. | 105 SERVER_FIRST_IPC_TYPE, // 1st Test message tag. |
| 107 SERVER_SECOND_IPC_TYPE, // 2nd Test message tag. | 106 SERVER_SECOND_IPC_TYPE, // 2nd Test message tag. |
| 108 SERVER_THIRD_IPC_TYPE, // 3rd Test message tag. | 107 SERVER_THIRD_IPC_TYPE, // 3rd Test message tag. |
| 109 CLIENT_MALFORMED_IPC, // Sent to client if server detects bad message. | 108 CLIENT_MALFORMED_IPC, // Sent to client if server detects bad message. |
| 110 CLIENT_UNHANDLED_IPC // Sent to client if server detects unhanded IPC. | 109 CLIENT_UNHANDLED_IPC // Sent to client if server detects unhanded IPC. |
| 111 }; | 110 }; |
| 112 | 111 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassIS::ID, | 422 msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassIS::ID, |
| 424 IPC::Message::PRIORITY_NORMAL); | 423 IPC::Message::PRIORITY_NORMAL); |
| 425 msg->WriteInt(0x64); | 424 msg->WriteInt(0x64); |
| 426 msg->WriteInt(0x32); | 425 msg->WriteInt(0x32); |
| 427 EXPECT_FALSE(server.OnMessageReceived(*msg)); | 426 EXPECT_FALSE(server.OnMessageReceived(*msg)); |
| 428 delete msg; | 427 delete msg; |
| 429 | 428 |
| 430 EXPECT_EQ(0, server.unhandled_msgs()); | 429 EXPECT_EQ(0, server.unhandled_msgs()); |
| 431 #endif | 430 #endif |
| 432 } | 431 } |
| OLD | NEW |