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

Side by Side Diff: mojo/edk/test/multiprocess_test_helper.h

Issue 2282413004: Support creating mojo peer connections from named pipes. (Closed)
Patch Set: Created 4 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MOJO_EDK_TEST_MULTIPROCESS_TEST_HELPER_H_ 5 #ifndef MOJO_EDK_TEST_MULTIPROCESS_TEST_HELPER_H_
6 #define MOJO_EDK_TEST_MULTIPROCESS_TEST_HELPER_H_ 6 #define MOJO_EDK_TEST_MULTIPROCESS_TEST_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 15 matching lines...) Expand all
26 class MultiprocessTestHelper { 26 class MultiprocessTestHelper {
27 public: 27 public:
28 using HandlerCallback = base::Callback<void(ScopedMessagePipeHandle)>; 28 using HandlerCallback = base::Callback<void(ScopedMessagePipeHandle)>;
29 29
30 enum class LaunchType { 30 enum class LaunchType {
31 // Launch the child process as a child in the mojo system. 31 // Launch the child process as a child in the mojo system.
32 CHILD, 32 CHILD,
33 33
34 // Launch the child process as an unrelated peer process in the mojo system. 34 // Launch the child process as an unrelated peer process in the mojo system.
35 PEER, 35 PEER,
36
37 // Launch the child process as a child in the mojo system, using a named
38 // pipe.
39 NAMED_CHILD,
40
41 // Launch the child process as an unrelated peer process in the mojo
42 // system, using a named pipe.
43 NAMED_PEER,
36 }; 44 };
37 45
38 MultiprocessTestHelper(); 46 MultiprocessTestHelper();
39 ~MultiprocessTestHelper(); 47 ~MultiprocessTestHelper();
40 48
41 // Start a child process and run the "main" function "named" |test_child_name| 49 // Start a child process and run the "main" function "named" |test_child_name|
42 // declared using |MOJO_MULTIPROCESS_TEST_CHILD_MAIN()| or 50 // declared using |MOJO_MULTIPROCESS_TEST_CHILD_MAIN()| or
43 // |MOJO_MULTIPROCESS_TEST_CHILD_TEST()| (below). 51 // |MOJO_MULTIPROCESS_TEST_CHILD_TEST()| (below).
44 ScopedMessagePipeHandle StartChild( 52 ScopedMessagePipeHandle StartChild(
45 const std::string& test_child_name, 53 const std::string& test_child_name,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 ProcessErrorCallback process_error_callback_; 97 ProcessErrorCallback process_error_callback_;
90 98
91 DISALLOW_COPY_AND_ASSIGN(MultiprocessTestHelper); 99 DISALLOW_COPY_AND_ASSIGN(MultiprocessTestHelper);
92 }; 100 };
93 101
94 } // namespace test 102 } // namespace test
95 } // namespace edk 103 } // namespace edk
96 } // namespace mojo 104 } // namespace mojo
97 105
98 #endif // MOJO_EDK_TEST_MULTIPROCESS_TEST_HELPER_H_ 106 #endif // MOJO_EDK_TEST_MULTIPROCESS_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/multiprocess_message_pipe_unittest.cc ('k') | mojo/edk/test/multiprocess_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698