blob: 43aaa6b6cd31ed9f730bedeed09d21905c7639fd [file] [log] [blame]
[email protected]97c652b2012-06-27 01:12:241// 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.
4
5#ifndef IPC_IPC_MULTIPROCESS_TEST_H_
6#define IPC_IPC_MULTIPROCESS_TEST_H_
[email protected]97c652b2012-06-27 01:12:247
[email protected]4ddaa4f2013-01-15 22:13:008#include "testing/multiprocess_func_list.h"
[email protected]97c652b2012-06-27 01:12:249
10// Use this macro when your sub-process is using an IPCChannel to communicate
[email protected]3c788582013-01-25 21:51:3511// with the test process. See the comment below for why this is needed.
[email protected]97c652b2012-06-27 01:12:2412#define MULTIPROCESS_IPC_TEST_MAIN(test_main) \
[email protected]3c788582013-01-25 21:51:3513 MULTIPROCESS_TEST_MAIN_WITH_SETUP(test_main, \
14 internal::MultiProcessTestIPCSetUp)
[email protected]97c652b2012-06-27 01:12:2415
[email protected]3c788582013-01-25 21:51:3516namespace internal {
17
18// Setup function used by MULTIPROCESS_IPC_TEST_MAIN. Registers the IPC channel
19// as a global descriptor in the child process. This is needed on POSIX as on
20// creation the IPCChannel looks for a specific global descriptor to establish
21// the connection to the parent process.
[email protected]97c652b2012-06-27 01:12:2422void MultiProcessTestIPCSetUp();
23
[email protected]3c788582013-01-25 21:51:3524} // namespace internal
25
[email protected]97c652b2012-06-27 01:12:2426#endif // IPC_IPC_MULTIPROCESS_TEST_H_