summaryrefslogtreecommitdiffstats
path: root/chrome/common/ipc_tests.h
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-09 22:00:47 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-09 22:00:47 +0000
commit95cb7fb94d22b073291ee45bf10ea880a4d93b33 (patch)
tree073bb49e20a94846f46106557904de2715c787c7 /chrome/common/ipc_tests.h
parent767cc7f25de0c9be199d1f4f267e569ff6788119 (diff)
downloadchromium_src-95cb7fb94d22b073291ee45bf10ea880a4d93b33.zip
chromium_src-95cb7fb94d22b073291ee45bf10ea880a4d93b33.tar.gz
chromium_src-95cb7fb94d22b073291ee45bf10ea880a4d93b33.tar.bz2
Bring up ipc tests on POSIX.
Review URL: http://codereview.chromium.org/13158 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6634 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/ipc_tests.h')
-rw-r--r--chrome/common/ipc_tests.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/chrome/common/ipc_tests.h b/chrome/common/ipc_tests.h
index ceac51a..30c043f 100644
--- a/chrome/common/ipc_tests.h
+++ b/chrome/common/ipc_tests.h
@@ -5,6 +5,7 @@
#ifndef CHROME_COMMON_IPC_TESTS_H__
#define CHROME_COMMON_IPC_TESTS_H__
+#include "base/multiprocess_test.h"
#include "base/process.h"
// This unit test uses 3 types of child processes, a regular pipe client,
@@ -20,13 +21,21 @@ extern const wchar_t kTestClientChannel[];
extern const wchar_t kReflectorChannel[];
extern const wchar_t kFuzzerChannel[];
-// Spawns a child process and then runs the code for one of the 3 possible
-// child modes.
-base::ProcessHandle SpawnChild(ChildType child_type);
+class MessageLoopForIO;
-// Runs the fuzzing server child mode. Returns true when the preset number
-// of messages have been received.
-bool RunFuzzServer();
+//Base class to facilitate Spawning IPC Client processes.
+class IPCChannelTest : public MultiProcessTest {
+ protected:
-#endif // CHROME_COMMON_IPC_TESTS_H__
+ // Create a new MessageLoopForIO For each test.
+ virtual void SetUp();
+ virtual void TearDown();
+
+ // Spawns a child process of the specified type
+ base::ProcessHandle SpawnChild(ChildType child_type);
+ // Created around each test instantiation.
+ MessageLoopForIO *message_loop_;
+};
+
+#endif // CHROME_COMMON_IPC_TESTS_H__