Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: ipc/ipc_tests.h

Issue 3035062: Revert 55400 - Cleanup in base. This moves the implementation (and a bunch of... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ipc/ipc_send_fds_test.cc ('k') | ipc/ipc_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IPC_IPC_TESTS_H_ 5 #ifndef IPC_IPC_TESTS_H__
6 #define IPC_IPC_TESTS_H_ 6 #define IPC_IPC_TESTS_H__
7 #pragma once 7 #pragma once
8 8
9 #include "base/test/multiprocess_test.h" 9 #include "base/multiprocess_test.h"
10 #include "base/process.h" 10 #include "base/process.h"
11 11
12 // This unit test uses 3 types of child processes, a regular pipe client, 12 // This unit test uses 3 types of child processes, a regular pipe client,
13 // a client reflector and a IPC server used for fuzzing tests. 13 // a client reflector and a IPC server used for fuzzing tests.
14 enum ChildType { 14 enum ChildType {
15 TEST_CLIENT, 15 TEST_CLIENT,
16 TEST_DESCRIPTOR_CLIENT, 16 TEST_DESCRIPTOR_CLIENT,
17 TEST_DESCRIPTOR_CLIENT_SANDBOXED, 17 TEST_DESCRIPTOR_CLIENT_SANDBOXED,
18 TEST_REFLECTOR, 18 TEST_REFLECTOR,
19 FUZZER_SERVER, 19 FUZZER_SERVER,
20 SYNC_SOCKET_SERVER 20 SYNC_SOCKET_SERVER
21 }; 21 };
22 22
23 // The different channel names for the child processes. 23 // The different channel names for the child processes.
24 extern const char kTestClientChannel[]; 24 extern const char kTestClientChannel[];
25 extern const char kReflectorChannel[]; 25 extern const char kReflectorChannel[];
26 extern const char kFuzzerChannel[]; 26 extern const char kFuzzerChannel[];
27 extern const char kSyncSocketChannel[]; 27 extern const char kSyncSocketChannel[];
28 28
29 class MessageLoopForIO; 29 class MessageLoopForIO;
30 namespace IPC { 30 namespace IPC {
31 class Channel; 31 class Channel;
32 } // namespace IPC 32 } // namespace IPC
33 33
34 //Base class to facilitate Spawning IPC Client processes. 34 //Base class to facilitate Spawning IPC Client processes.
35 class IPCChannelTest : public base::MultiProcessTest { 35 class IPCChannelTest : public MultiProcessTest {
36 protected: 36 protected:
37 37
38 // Create a new MessageLoopForIO For each test. 38 // Create a new MessageLoopForIO For each test.
39 virtual void SetUp(); 39 virtual void SetUp();
40 virtual void TearDown(); 40 virtual void TearDown();
41 41
42 // Spawns a child process of the specified type 42 // Spawns a child process of the specified type
43 base::ProcessHandle SpawnChild(ChildType child_type, IPC::Channel* channel); 43 base::ProcessHandle SpawnChild(ChildType child_type, IPC::Channel* channel);
44 44
45 // Created around each test instantiation. 45 // Created around each test instantiation.
46 MessageLoopForIO* message_loop_; 46 MessageLoopForIO* message_loop_;
47 }; 47 };
48 48
49 #endif // IPC_IPC_TESTS_H_ 49 #endif // IPC_IPC_TESTS_H__
OLDNEW
« no previous file with comments | « ipc/ipc_send_fds_test.cc ('k') | ipc/ipc_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698