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

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

Issue 830593003: Update mojo sdk to rev 9fbbc4f0fef1187312316c0ed992342474e139f1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cherry-pick mojo 9d3b8dd17f12d20035a14737fdc38dd926890ff8 Created 5 years, 11 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/system/unique_identifier_unittest.cc ('k') | mojo/mojo_services_public.gyp » ('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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 base::SpawnMultiProcessTestChild(test_child_main, command_line, options); 52 base::SpawnMultiProcessTestChild(test_child_main, command_line, options);
53 platform_channel_pair_->ChildProcessLaunched(); 53 platform_channel_pair_->ChildProcessLaunched();
54 54
55 CHECK(test_child_.IsValid()); 55 CHECK(test_child_.IsValid());
56 } 56 }
57 57
58 int MultiprocessTestHelper::WaitForChildShutdown() { 58 int MultiprocessTestHelper::WaitForChildShutdown() {
59 CHECK(test_child_.IsValid()); 59 CHECK(test_child_.IsValid());
60 60
61 int rv = -1; 61 int rv = -1;
62 CHECK(test_child_.WaitForExitWithTimeout(TestTimeouts::action_timeout(), 62 CHECK(
63 &rv)); 63 test_child_.WaitForExitWithTimeout(TestTimeouts::action_timeout(), &rv));
64 test_child_.Close(); 64 test_child_.Close();
65 return rv; 65 return rv;
66 } 66 }
67 67
68 bool MultiprocessTestHelper::WaitForChildTestShutdown() { 68 bool MultiprocessTestHelper::WaitForChildTestShutdown() {
69 return WaitForChildShutdown() == 0; 69 return WaitForChildShutdown() == 0;
70 } 70 }
71 71
72 // static 72 // static
73 void MultiprocessTestHelper::ChildSetup() { 73 void MultiprocessTestHelper::ChildSetup() {
74 CHECK(base::CommandLine::InitializedForCurrentProcess()); 74 CHECK(base::CommandLine::InitializedForCurrentProcess());
75 client_platform_handle = 75 client_platform_handle =
76 embedder::PlatformChannelPair::PassClientHandleFromParentProcess( 76 embedder::PlatformChannelPair::PassClientHandleFromParentProcess(
77 *base::CommandLine::ForCurrentProcess()); 77 *base::CommandLine::ForCurrentProcess());
78 } 78 }
79 79
80 // static 80 // static
81 embedder::ScopedPlatformHandle MultiprocessTestHelper::client_platform_handle; 81 embedder::ScopedPlatformHandle MultiprocessTestHelper::client_platform_handle;
82 82
83 } // namespace test 83 } // namespace test
84 } // namespace mojo 84 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/unique_identifier_unittest.cc ('k') | mojo/mojo_services_public.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698