1 // Copyright 2014 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "ipc/ipc_message_macros.h" 6 #include "ipc/ipc_message_start.h" 7 8 // Singly-included section for enums and custom IPC traits. 9 #ifndef IPC_IPC_CHANNEL_PROXY_UNITTEST_MESSAGES_H_ 10 #define IPC_IPC_CHANNEL_PROXY_UNITTEST_MESSAGES_H_ 11 12 class BadType { 13 public: BadType()14 BadType() {} 15 }; 16 17 namespace IPC { 18 19 template <> 20 struct ParamTraits<BadType> { 21 static void Write(base::Pickle* m, const BadType& p) {} 22 static bool Read(const base::Pickle* m, 23 base::PickleIterator* iter, 24 BadType* r) { 25 return false; 26 } 27 static void Log(const BadType& p, std::string* l) {} 28 }; 29 30 } 31 32 #endif // IPC_IPC_CHANNEL_PROXY_UNITTEST_MESSAGES_H_ 33 34 #undef IPC_MESSAGE_START 35 #define IPC_MESSAGE_START TestMsgStart 36 IPC_MESSAGE_CONTROL0(TestMsg_Bounce) 37 IPC_MESSAGE_CONTROL0(TestMsg_SendBadMessage) 38 IPC_MESSAGE_CONTROL1(TestMsg_BadMessage, BadType) 39 40 #undef IPC_MESSAGE_START 41 #define IPC_MESSAGE_START AutomationMsgStart 42 IPC_MESSAGE_CONTROL0(AutomationMsg_Bounce) 43 44 #undef IPC_MESSAGE_START 45 #define IPC_MESSAGE_START WorkerMsgStart 46 IPC_MESSAGE_CONTROL0(WorkerMsg_Bounce) 47 IPC_MESSAGE_CONTROL0(WorkerMsg_Quit) 48