blob: 3bf2ad87f4a6677250a16e5cbd5d3aa31ee8026a [file] [log] [blame]
jcivelli@chromium.orgc30c76f2012-06-27 10:12:24 +09001// 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_
jcivelli@chromium.orgc30c76f2012-06-27 10:12:24 +09007
viettrungluu@chromium.org9cdc36e2013-01-16 07:13:00 +09008#include "testing/multiprocess_func_list.h"
jcivelli@chromium.orgc30c76f2012-06-27 10:12:24 +09009
10// Use this macro when your sub-process is using an IPCChannel to communicate
11// with the test process.
12// See comment below for MultiProcessTestIPCSetUp() on why this is needed.
13#define MULTIPROCESS_IPC_TEST_MAIN(test_main) \
14 MULTIPROCESS_TEST_MAIN_WITH_SETUP(test_main, MultiProcessTestIPCSetUp)
15
16// Setup function used by MULTIPROCESS_IPC_TEST_MAIN.
17// Registers the IPC channel as a global descriptor in the child process. This
18// is needed on POSIX as the IPCChannel when created looks for a specific global
19// descriptor to establish the connection to the parent process.
20void MultiProcessTestIPCSetUp();
21
22#endif // IPC_IPC_MULTIPROCESS_TEST_H_