Lines Matching +full:- +full:- +full:ipc
2 // Use of this source code is governed by a BSD-style license that can be
18 #include "ipc/ipc_test_base.h"
21 // IPC messages for testing ----------------------------------------------------
24 #include "ipc/ipc_message_macros.h"
34 // Message to create a mutex in the IPC server, using the received name.
40 // -----------------------------------------------------------------------------
46 uint32_t v1 = std::numeric_limits<uint32_t>::max() - 1; in TEST()
48 IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); in TEST()
59 uint32_t v1 = std::numeric_limits<uint32_t>::max() - 1; in TEST()
61 IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); in TEST()
72 IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); in TEST()
84 // try to hit the non-specialized case vector<P>. in TEST()
85 IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); in TEST()
86 m.WriteInt(-1); // This is the count of elements. in TEST()
103 // we try to hit the non-specialized case vector<P>. in TEST()
104 IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); in TEST()
117 // the non-specialized case vector<P>. in TEST()
118 IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); in TEST()
132 IPC::WriteParam(&pickle, 256 * 1024 * 1024); in TEST()
133 IPC::WriteParam(&pickle, 0); in TEST()
134 IPC::WriteParam(&pickle, 1); in TEST()
135 IPC::WriteParam(&pickle, 2); in TEST()
139 EXPECT_FALSE(IPC::ReadParam(&pickle, &iter, &vec)); in TEST()
142 class SimpleListener : public IPC::Listener {
146 void Init(IPC::Sender* s) { in Init()
150 IPC::Sender* other_;
158 // only two IPC calls; after that it exits the message loop which
164 bool OnMessageReceived(const IPC::Message& msg) override { in OnMessageReceived()
172 // Probably a problem de-serializing the message. in OnMessageReceived()
193 IPC::Message* message = new IPC::Message(routing, type_id, in RoundtripAckReply()
194 IPC::Message::PRIORITY_NORMAL); in RoundtripAckReply()
195 message->WriteInt(reply + 1); in RoundtripAckReply()
196 message->WriteInt(reply); in RoundtripAckReply()
197 return other_->Send(message); in RoundtripAckReply()
201 --message_count_; in Cleanup()
202 --pending_messages_; in Cleanup()
214 os << "IPC fuzzer:" << caller << " [" << value << " " in UseData()
229 bool OnMessageReceived(const IPC::Message& msg) override { in OnMessageReceived()
230 last_msg_ = new IPC::Message(msg); in OnMessageReceived()
264 if (FUZZER_ROUTING_ID != last_msg_->routing_id()) in MsgHandlerInternal()
266 return (type_id == last_msg_->type()); in MsgHandlerInternal()
269 IPC::Message* last_msg_;
285 // are working properly by generating two well formed IPC calls.
294 IPC::Message* msg = NULL; in TEST_F()
297 sender()->Send(msg); in TEST_F()
301 sender()->Send(msg); in TEST_F()
309 // error while unpacking the IPC buffer. Right after we generate another valid
310 // IPC to make sure framing is working properly.
319 IPC::Message* msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassIS::ID, in TEST_F()
320 IPC::Message::PRIORITY_NORMAL); in TEST_F()
321 msg->WriteInt(666); in TEST_F()
322 sender()->Send(msg); in TEST_F()
326 sender()->Send(msg); in TEST_F()
336 // as by design we don't carry type information on the IPC message.
345 IPC::Message* msg = new IPC::Message(MSG_ROUTING_CONTROL, MsgClassSI::ID, in TEST_F()
346 IPC::Message::PRIORITY_NORMAL); in TEST_F()
347 msg->WriteString16(base::ASCIIToUTF16("d")); in TEST_F()
348 msg->WriteInt(0); in TEST_F()
349 msg->WriteInt(0x65); // Extra argument. in TEST_F()
351 sender()->Send(msg); in TEST_F()
357 sender()->Send(msg); in TEST_F()