OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Unit test to make sure that the serialization of synchronous IPC messages | 5 // Unit test to make sure that the serialization of synchronous IPC messages |
6 // works. This ensures that the macros and templates were defined correctly. | 6 // works. This ensures that the macros and templates were defined correctly. |
7 // Doesn't test the IPC channel mechanism. | 7 // Doesn't test the IPC channel mechanism. |
8 | 8 |
9 #include <string.h> | 9 #include "base/logging.h" |
10 | |
11 #include "base/basictypes.h" | |
12 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
13 #include "ipc/ipc_message_utils.h" | 11 #include "ipc/ipc_message_utils.h" |
14 #include "base/logging.h" | |
15 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
16 | 13 |
17 #define IPC_MESSAGE_IMPL | 14 #define IPC_MESSAGE_IMPL |
18 #include "ipc/ipc_sync_message_unittest.h" | 15 #include "ipc/ipc_sync_message_unittest.h" |
19 | 16 |
20 namespace { | 17 namespace { |
21 | 18 |
22 static IPC::Message* g_reply; | 19 static IPC::Message* g_reply; |
23 | 20 |
24 class TestMessageReceiver { | 21 class TestMessageReceiver { |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 DCHECK_EQ(32, int1); | 295 DCHECK_EQ(32, int1); |
299 | 296 |
300 bool1 = true; | 297 bool1 = true; |
301 Send(new Msg_R_3_3(0, 3, "3_3", true, &string1, &int1, &bool1)); | 298 Send(new Msg_R_3_3(0, 3, "3_3", true, &string1, &int1, &bool1)); |
302 DCHECK_EQ("3_3", string1); | 299 DCHECK_EQ("3_3", string1); |
303 DCHECK_EQ(33, int1); | 300 DCHECK_EQ(33, int1); |
304 DCHECK(!bool1); | 301 DCHECK(!bool1); |
305 } | 302 } |
306 | 303 |
307 } // namespace | 304 } // namespace |
OLD | NEW |