diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-25 21:51:35 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-25 21:51:35 +0000 |
commit | 3c78858906d3d0d7f5319d7c993240284b4503b5 (patch) | |
tree | 1abeaac1ec6d16e96c05ef5f534681979d1f4ef6 /ipc/ipc_multiprocess_test.h | |
parent | cdf594b2db94ff9c66d3f552a063706c16015c2b (diff) | |
download | chromium_src-3c78858906d3d0d7f5319d7c993240284b4503b5.zip chromium_src-3c78858906d3d0d7f5319d7c993240284b4503b5.tar.gz chromium_src-3c78858906d3d0d7f5319d7c993240284b4503b5.tar.bz2 |
Refactor (many) IPC tests, notably most of the multiprocess tests.
This factors out common code and, more importantly/usefully, makes test-specific
code more local, and thus easier to add new tests and maintain existing ones. In
particular, this allows you to add a new test "client" (running in another
process) without modifying ipc_test_base.*.
Review URL: https://codereview.chromium.org/12051048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_multiprocess_test.h')
-rw-r--r-- | ipc/ipc_multiprocess_test.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ipc/ipc_multiprocess_test.h b/ipc/ipc_multiprocess_test.h index 3bf2ad8..43aaa6b 100644 --- a/ipc/ipc_multiprocess_test.h +++ b/ipc/ipc_multiprocess_test.h @@ -8,15 +8,19 @@ #include "testing/multiprocess_func_list.h" // Use this macro when your sub-process is using an IPCChannel to communicate -// with the test process. -// See comment below for MultiProcessTestIPCSetUp() on why this is needed. +// 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, MultiProcessTestIPCSetUp) + MULTIPROCESS_TEST_MAIN_WITH_SETUP(test_main, \ + internal::MultiProcessTestIPCSetUp) -// 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 the IPCChannel when created looks for a specific global -// descriptor to establish the connection to the parent process. +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_ |