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

Unified Diff: mojo/edk/test/mojo_test_base.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/test/mojo_test_base.h ('k') | mojo/edk/test/multiprocess_test_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/test/mojo_test_base.cc
diff --git a/mojo/edk/test/mojo_test_base.cc b/mojo/edk/test/mojo_test_base.cc
index d200fc02df76d1db0f09cfaa54764c6a637ca924..5d77a1123d2fd153fccd428b9da5e5df669a2d9d 100644
--- a/mojo/edk/test/mojo_test_base.cc
+++ b/mojo/edk/test/mojo_test_base.cc
@@ -43,12 +43,15 @@ MojoTestBase::~MojoTestBase() {}
MojoTestBase::ClientController& MojoTestBase::StartClient(
const std::string& client_name) {
- clients_.push_back(base::WrapUnique(new ClientController(client_name, this)));
+ clients_.push_back(base::MakeUnique<ClientController>(
+ client_name, this, process_error_callback_));
return *clients_.back();
}
-MojoTestBase::ClientController::ClientController(const std::string& client_name,
- MojoTestBase* test) {
+MojoTestBase::ClientController::ClientController(
+ const std::string& client_name,
+ MojoTestBase* test,
+ const ProcessErrorCallback& process_error_callback) {
#if !defined(OS_IOS)
#if defined(OS_MACOSX)
// This lock needs to be held while launching the child because the Mach port
@@ -59,6 +62,7 @@ MojoTestBase::ClientController::ClientController(const std::string& client_name,
// launch and child pid registration.
base::AutoLock lock(g_mach_broker->GetLock());
#endif
+ helper_.set_process_error_callback(process_error_callback);
pipe_ = helper_.StartChild(client_name);
#if defined(OS_MACOSX)
g_mach_broker->AddPlaceholderForPid(helper_.test_child().Handle());
« no previous file with comments | « mojo/edk/test/mojo_test_base.h ('k') | mojo/edk/test/multiprocess_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698