summaryrefslogtreecommitdiffstats
path: root/chrome/common/ipc_tests.h
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 02:29:45 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 02:29:45 +0000
commit82e5ee816a5f05d230c5356205e93d803650d0b9 (patch)
tree6b6e9d1bef407feef8ef24eedc9f343e2d536609 /chrome/common/ipc_tests.h
parent8cf3f1dae79db8cfbf9dc6b75c140eabad918a6e (diff)
downloadchromium_src-82e5ee816a5f05d230c5356205e93d803650d0b9.zip
chromium_src-82e5ee816a5f05d230c5356205e93d803650d0b9.tar.gz
chromium_src-82e5ee816a5f05d230c5356205e93d803650d0b9.tar.bz2
Revert "Move IPC code to ipc/"
This reverts commit r13062 which, unsurprisingly, broke the build. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13063 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/ipc_tests.h')
-rw-r--r--chrome/common/ipc_tests.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/chrome/common/ipc_tests.h b/chrome/common/ipc_tests.h
new file mode 100644
index 0000000..3cefafe
--- /dev/null
+++ b/chrome/common/ipc_tests.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2006-2008 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 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,
+// a client reflector and a IPC server used for fuzzing tests.
+enum ChildType {
+ TEST_CLIENT,
+ TEST_DESCRIPTOR_CLIENT,
+ TEST_DESCRIPTOR_CLIENT_SANDBOXED,
+ TEST_REFLECTOR,
+ FUZZER_SERVER
+};
+
+// The different channel names for the child processes.
+extern const wchar_t kTestClientChannel[];
+extern const wchar_t kReflectorChannel[];
+extern const wchar_t kFuzzerChannel[];
+
+class MessageLoopForIO;
+namespace IPC {
+class Channel;
+} // namespace IPC
+
+//Base class to facilitate Spawning IPC Client processes.
+class IPCChannelTest : public MultiProcessTest {
+ protected:
+
+ // 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,
+ IPC::Channel *channel);
+
+ // Created around each test instantiation.
+ MessageLoopForIO *message_loop_;
+};
+
+#endif // CHROME_COMMON_IPC_TESTS_H__