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

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

Issue 2043713004: Mojo: Add NotifyBadMessage API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no bindings Created 4 years, 6 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
« no previous file with comments | « mojo/edk/test/multiprocess_test_helper.h ('k') | mojo/public/c/system/message_pipe.h » ('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 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 #include "mojo/edk/test/multiprocess_test_helper.h" 5 #include "mojo/edk/test/multiprocess_test_helper.h"
6 6
7 #include <functional> 7 #include <functional>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 std::string child_token = mojo::edk::GenerateRandomToken(); 119 std::string child_token = mojo::edk::GenerateRandomToken();
120 ScopedMessagePipeHandle pipe = CreateParentMessagePipe(pipe_token, 120 ScopedMessagePipeHandle pipe = CreateParentMessagePipe(pipe_token,
121 child_token); 121 child_token);
122 122
123 test_child_ = 123 test_child_ =
124 base::SpawnMultiProcessTestChild(test_child_main, command_line, options); 124 base::SpawnMultiProcessTestChild(test_child_main, command_line, options);
125 channel.ChildProcessLaunched(); 125 channel.ChildProcessLaunched();
126 126
127 ChildProcessLaunched(test_child_.Handle(), channel.PassServerHandle(), 127 ChildProcessLaunched(test_child_.Handle(), channel.PassServerHandle(),
128 child_token); 128 child_token, process_error_callback_);
129 CHECK(test_child_.IsValid()); 129 CHECK(test_child_.IsValid());
130 130
131 return pipe; 131 return pipe;
132 } 132 }
133 133
134 int MultiprocessTestHelper::WaitForChildShutdown() { 134 int MultiprocessTestHelper::WaitForChildShutdown() {
135 CHECK(test_child_.IsValid()); 135 CHECK(test_child_.IsValid());
136 136
137 int rv = -1; 137 int rv = -1;
138 #if defined(OS_ANDROID) 138 #if defined(OS_ANDROID)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 ::testing::Test::HasNonfatalFailure()) ? 1 : 0; 185 ::testing::Test::HasNonfatalFailure()) ? 1 : 0;
186 }); 186 });
187 } 187 }
188 188
189 // static 189 // static
190 std::string MultiprocessTestHelper::primordial_pipe_token; 190 std::string MultiprocessTestHelper::primordial_pipe_token;
191 191
192 } // namespace test 192 } // namespace test
193 } // namespace edk 193 } // namespace edk
194 } // namespace mojo 194 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/test/multiprocess_test_helper.h ('k') | mojo/public/c/system/message_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698