Update V8 to version 4.7.21.
[chromium-blink-merge.git] / ipc / ipc_sync_message_unittest.h
blob114aca6fb6b164a784e1495a2d1884668a72a5aa
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include <string>
7 #include "ipc/ipc_message_macros.h"
9 #define IPC_MESSAGE_START TestMsgStart
11 IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_NoArgs)
13 IPC_SYNC_MESSAGE_CONTROL0_1(SyncChannelTestMsg_AnswerToLife,
14 int /* answer */)
16 IPC_SYNC_MESSAGE_CONTROL1_1(SyncChannelTestMsg_Double,
17 int /* in */,
18 int /* out */)
20 IPC_SYNC_MESSAGE_CONTROL0_1(SyncChannelNestedTestMsg_String,
21 std::string)
23 // out1 is false
24 IPC_SYNC_MESSAGE_CONTROL0_1(Msg_C_0_1, bool)
26 // out1 is true, out2 is 2
27 IPC_SYNC_MESSAGE_CONTROL0_2(Msg_C_0_2, bool, int)
29 // out1 is false, out2 is 3, out3 is "0_3"
30 IPC_SYNC_MESSAGE_CONTROL0_3(Msg_C_0_3, bool, int, std::string)
32 // in1 must be 1, out1 is true
33 IPC_SYNC_MESSAGE_CONTROL1_1(Msg_C_1_1, int, bool)
35 // in1 must be false, out1 is true, out2 is 12
36 IPC_SYNC_MESSAGE_CONTROL1_2(Msg_C_1_2, bool, bool, int)
38 // in1 must be 3, out1 is "1_3", out2 is 13, out3 is false
39 IPC_SYNC_MESSAGE_CONTROL1_3(Msg_C_1_3, int, std::string, int, bool)
41 // in1 must be 1, in2 must be false, out1 is true
42 IPC_SYNC_MESSAGE_CONTROL2_1(Msg_C_2_1, int, bool, bool)
44 // in1 must be false, in2 must be 2, out1 is true, out2 is 22
45 IPC_SYNC_MESSAGE_CONTROL2_2(Msg_C_2_2, bool, int, bool, int)
47 // in1 must be 3, in2 must be true, out1 is "2_3", out2 is 23, out3 is false
48 IPC_SYNC_MESSAGE_CONTROL2_3(Msg_C_2_3, int, bool, std::string, int, bool)
50 // in1 must be 1, in2 must be false, in3 must be "3_1", out1 is true
51 IPC_SYNC_MESSAGE_CONTROL3_1(Msg_C_3_1, int, bool, std::string, bool)
53 // in1 must be "3_3", in2 must be false, in3 must be 2, out1 is true, out2 is
54 // 32
55 IPC_SYNC_MESSAGE_CONTROL3_2(Msg_C_3_2, std::string, bool, int, bool, int)
57 // in1 must be 3, in2 must be "3_3", in3 must be true, out1 is "3_3", out2 is
58 // 33, out3 is false
59 IPC_SYNC_MESSAGE_CONTROL3_3(Msg_C_3_3, int, std::string, bool, std::string,
60 int, bool)
62 // in1 must be true, in2 must be 3, in3 must be "3_4", out1 is 34, out2 is
63 // true, out3 is "3_4", out3 is false
64 IPC_SYNC_MESSAGE_CONTROL3_4(Msg_C_3_4, bool, int, std::string, int, bool,
65 std::string, bool)
67 // NOTE: routed messages are just a copy of the above...
69 // out1 is false
70 IPC_SYNC_MESSAGE_ROUTED0_1(Msg_R_0_1, bool)
72 // out1 is true, out2 is 2
73 IPC_SYNC_MESSAGE_ROUTED0_2(Msg_R_0_2, bool, int)
75 // out1 is false, out2 is 3, out3 is "0_3"
76 IPC_SYNC_MESSAGE_ROUTED0_3(Msg_R_0_3, bool, int, std::string)
78 // in1 must be 1, out1 is true
79 IPC_SYNC_MESSAGE_ROUTED1_1(Msg_R_1_1, int, bool)
81 // in1 must be false, out1 is true, out2 is 12
82 IPC_SYNC_MESSAGE_ROUTED1_2(Msg_R_1_2, bool, bool, int)
84 // in1 must be 3, out1 is "1_3", out2 is 13, out3 is false
85 IPC_SYNC_MESSAGE_ROUTED1_3(Msg_R_1_3, int, std::string, int, bool)
87 // in1 must be 1, in2 must be false, out1 is true
88 IPC_SYNC_MESSAGE_ROUTED2_1(Msg_R_2_1, int, bool, bool)
90 // in1 must be false, in2 must be 2, out1 is true, out2 is 22
91 IPC_SYNC_MESSAGE_ROUTED2_2(Msg_R_2_2, bool, int, bool, int)
93 // in1 must be 3, in2 must be true, out1 is "2_3", out2 is 23, out3 is false
94 IPC_SYNC_MESSAGE_ROUTED2_3(Msg_R_2_3, int, bool, std::string, int, bool)
96 // in1 must be 1, in2 must be false, in3 must be "3_1", out1 is true
97 IPC_SYNC_MESSAGE_ROUTED3_1(Msg_R_3_1, int, bool, std::string, bool)
99 // in1 must be "3_3", in2 must be false, in3 must be 2, out1 is true, out2
100 // is 32
101 IPC_SYNC_MESSAGE_ROUTED3_2(Msg_R_3_2, std::string, bool, int, bool, int)
103 // in1 must be 3, in2 must be "3_3", in3 must be true, out1 is "3_3", out2 is
104 // 33, out3 is false
105 IPC_SYNC_MESSAGE_ROUTED3_3(Msg_R_3_3, int, std::string, bool, std::string,
106 int, bool)
108 // in1 must be true, in2 must be 3, in3 must be "3_4", out1 is 34, out2 is
109 // true, out3 is "3_4", out4 is false
110 IPC_SYNC_MESSAGE_ROUTED3_4(Msg_R_3_4, bool, int, std::string, int, bool,
111 std::string, bool)
113 IPC_MESSAGE_CONTROL1(SyncChannelTestMsg_Ping, int)
114 IPC_SYNC_MESSAGE_CONTROL1_1(SyncChannelTestMsg_PingTTL, int, int)
115 IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_Done)
117 // Messages for ReentrantReply test.
118 IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_Reentrant1)
119 IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_Reentrant2)
120 IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_Reentrant3)