Added histograms for default search provider protection. Removed protection
[chromium-blink-merge.git] / ipc / ipc_tests.h
blobbfefb4c46b7c47d9666552d2f7bffbe5d2f626ea
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
3 // found in the LICENSE file.
5 #ifndef IPC_IPC_TESTS_H_
6 #define IPC_IPC_TESTS_H_
7 #pragma once
9 #include "base/test/multiprocess_test.h"
10 #include "base/process.h"
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.
14 enum ChildType {
15 TEST_CLIENT,
16 TEST_DESCRIPTOR_CLIENT,
17 TEST_DESCRIPTOR_CLIENT_SANDBOXED,
18 TEST_REFLECTOR,
19 FUZZER_SERVER,
20 SYNC_SOCKET_SERVER
23 // The different channel names for the child processes.
24 extern const char kTestClientChannel[];
25 extern const char kReflectorChannel[];
26 extern const char kFuzzerChannel[];
27 extern const char kSyncSocketChannel[];
29 class MessageLoopForIO;
30 namespace IPC {
31 class Channel;
32 } // namespace IPC
34 //Base class to facilitate Spawning IPC Client processes.
35 class IPCChannelTest : public base::MultiProcessTest {
36 protected:
38 // Create a new MessageLoopForIO For each test.
39 virtual void SetUp();
40 virtual void TearDown();
42 // Spawns a child process of the specified type
43 base::ProcessHandle SpawnChild(ChildType child_type, IPC::Channel* channel);
45 // Created around each test instantiation.
46 MessageLoopForIO* message_loop_;
49 #endif // IPC_IPC_TESTS_H_