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

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

Issue 728043002: Revert of Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/edk/test/run_all_unittests.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 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/process/kill.h" 9 #include "base/process/kill.h"
10 #include "base/process/process_handle.h" 10 #include "base/process/process_handle.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 base::SpawnMultiProcessTestChild(test_child_main, command_line, options); 53 base::SpawnMultiProcessTestChild(test_child_main, command_line, options);
54 platform_channel_pair_->ChildProcessLaunched(); 54 platform_channel_pair_->ChildProcessLaunched();
55 55
56 CHECK_NE(test_child_handle_, base::kNullProcessHandle); 56 CHECK_NE(test_child_handle_, base::kNullProcessHandle);
57 } 57 }
58 58
59 int MultiprocessTestHelper::WaitForChildShutdown() { 59 int MultiprocessTestHelper::WaitForChildShutdown() {
60 CHECK_NE(test_child_handle_, base::kNullProcessHandle); 60 CHECK_NE(test_child_handle_, base::kNullProcessHandle);
61 61
62 int rv = -1; 62 int rv = -1;
63 CHECK(base::WaitForExitCodeWithTimeout(test_child_handle_, &rv, 63 CHECK(base::WaitForExitCodeWithTimeout(
64 TestTimeouts::action_timeout())); 64 test_child_handle_, &rv, TestTimeouts::action_timeout()));
65 base::CloseProcessHandle(test_child_handle_); 65 base::CloseProcessHandle(test_child_handle_);
66 test_child_handle_ = base::kNullProcessHandle; 66 test_child_handle_ = base::kNullProcessHandle;
67 return rv; 67 return rv;
68 } 68 }
69 69
70 bool MultiprocessTestHelper::WaitForChildTestShutdown() { 70 bool MultiprocessTestHelper::WaitForChildTestShutdown() {
71 return WaitForChildShutdown() == 0; 71 return WaitForChildShutdown() == 0;
72 } 72 }
73 73
74 // static 74 // static
75 void MultiprocessTestHelper::ChildSetup() { 75 void MultiprocessTestHelper::ChildSetup() {
76 CHECK(base::CommandLine::InitializedForCurrentProcess()); 76 CHECK(base::CommandLine::InitializedForCurrentProcess());
77 client_platform_handle = 77 client_platform_handle =
78 embedder::PlatformChannelPair::PassClientHandleFromParentProcess( 78 embedder::PlatformChannelPair::PassClientHandleFromParentProcess(
79 *base::CommandLine::ForCurrentProcess()); 79 *base::CommandLine::ForCurrentProcess());
80 } 80 }
81 81
82 // static 82 // static
83 embedder::ScopedPlatformHandle MultiprocessTestHelper::client_platform_handle; 83 embedder::ScopedPlatformHandle MultiprocessTestHelper::client_platform_handle;
84 84
85 } // namespace test 85 } // namespace test
86 } // namespace mojo 86 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/test/multiprocess_test_helper.h ('k') | mojo/edk/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698