blob: 43aaa6b6cd31ed9f730bedeed09d21905c7639fd [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
viettrungluu@chromium.org00155942013-01-26 06:51:35 +090011// with the test process. See the comment below for why this is needed.
jcivelli@chromium.orgc30c76f2012-06-27 10:12:24 +090012#define MULTIPROCESS_IPC_TEST_MAIN(test_main) \
viettrungluu@chromium.org00155942013-01-26 06:51:35 +090013 MULTIPROCESS_TEST_MAIN_WITH_SETUP(test_main, \
14 internal::MultiProcessTestIPCSetUp)
jcivelli@chromium.orgc30c76f2012-06-27 10:12:24 +090015
viettrungluu@chromium.org00155942013-01-26 06:51:35 +090016namespace 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.
jcivelli@chromium.orgc30c76f2012-06-27 10:12:24 +090022void MultiProcessTestIPCSetUp();
23
viettrungluu@chromium.org00155942013-01-26 06:51:35 +090024} // namespace internal
25
jcivelli@chromium.orgc30c76f2012-06-27 10:12:24 +090026#endif // IPC_IPC_MULTIPROCESS_TEST_H_