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

Side by Side Diff: mojo/shell/runner/host/child_process_host_unittest.cc

Issue 1761153002: Replace ChildController with ShellClientFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@29binding
Patch Set: . Created 4 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // Note: This file also tests child_process.*. 5 // Note: This file also tests child_process.*.
6 6
7 #include "mojo/shell/runner/host/child_process_host.h" 7 #include "mojo/shell/runner/host/child_process_host.h"
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 NativeRunnerDelegateImpl native_runner_delegate; 93 NativeRunnerDelegateImpl native_runner_delegate;
94 ChildProcessHost child_process_host(blocking_pool.get(), 94 ChildProcessHost child_process_host(blocking_pool.get(),
95 &native_runner_delegate, false, 95 &native_runner_delegate, false,
96 Identity(), base::FilePath()); 96 Identity(), base::FilePath());
97 base::RunLoop run_loop; 97 base::RunLoop run_loop;
98 child_process_host.Start( 98 child_process_host.Start(
99 base::Bind(&ProcessReadyCallbackAdapater, run_loop.QuitClosure())); 99 base::Bind(&ProcessReadyCallbackAdapater, run_loop.QuitClosure()));
100 run_loop.Run(); 100 run_loop.Run();
101 101
102 child_process_host.ExitNow(123); 102 child_process_host.Join();
103 int exit_code = child_process_host.Join();
104 VLOG(2) << "Joined child: exit_code = " << exit_code;
105 EXPECT_EQ(123, exit_code);
106 blocking_pool->Shutdown(); 103 blocking_pool->Shutdown();
107 edk::ShutdownIPCSupport(); 104 edk::ShutdownIPCSupport();
108 EXPECT_EQ(1u, native_runner_delegate.get_and_clear_adjust_count()); 105 EXPECT_EQ(1u, native_runner_delegate.get_and_clear_adjust_count());
109 } 106 }
110 107
111 } // namespace 108 } // namespace
112 } // namespace shell 109 } // namespace shell
113 } // namespace mojo 110 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/runner/host/child_process_host.cc ('k') | mojo/shell/runner/host/in_process_native_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698