summaryrefslogtreecommitdiff
path: root/chromium/ipc/ipc_multiprocess_test.h
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2013-08-15 21:46:11 +0200
committerZeno Albisser <zeno.albisser@digia.com>2013-08-15 21:46:11 +0200
commit679147eead574d186ebf3069647b4c23e8ccace6 (patch)
treefc247a0ac8ff119f7c8550879ebb6d3dd8d1ff69 /chromium/ipc/ipc_multiprocess_test.h
downloadqtwebengine-chromium-679147eead574d186ebf3069647b4c23e8ccace6.tar.gz
Initial import.
Diffstat (limited to 'chromium/ipc/ipc_multiprocess_test.h')
-rw-r--r--chromium/ipc/ipc_multiprocess_test.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/chromium/ipc/ipc_multiprocess_test.h b/chromium/ipc/ipc_multiprocess_test.h
new file mode 100644
index 00000000000..43aaa6b6cd3
--- /dev/null
+++ b/chromium/ipc/ipc_multiprocess_test.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IPC_IPC_MULTIPROCESS_TEST_H_
+#define IPC_IPC_MULTIPROCESS_TEST_H_
+
+#include "testing/multiprocess_func_list.h"
+
+// Use this macro when your sub-process is using an IPCChannel to communicate
+// with the test process. See the comment below for why this is needed.
+#define MULTIPROCESS_IPC_TEST_MAIN(test_main) \
+ MULTIPROCESS_TEST_MAIN_WITH_SETUP(test_main, \
+ internal::MultiProcessTestIPCSetUp)
+
+namespace internal {
+
+// Setup function used by MULTIPROCESS_IPC_TEST_MAIN. Registers the IPC channel
+// as a global descriptor in the child process. This is needed on POSIX as on
+// creation the IPCChannel looks for a specific global descriptor to establish
+// the connection to the parent process.
+void MultiProcessTestIPCSetUp();
+
+} // namespace internal
+
+#endif // IPC_IPC_MULTIPROCESS_TEST_H_