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

Unified Diff: third_party/mojo/src/mojo/edk/test/multiprocess_test_helper.cc

Issue 1157843002: Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: third_party/mojo/src/mojo/edk/test/multiprocess_test_helper.cc
diff --git a/third_party/mojo/src/mojo/edk/test/multiprocess_test_helper.cc b/third_party/mojo/src/mojo/edk/test/multiprocess_test_helper.cc
index 6dd8b72a088d2b4aa939902e159258749a17be8b..c107a02da2abf627778b6c4807fc3600e4d3ffc6 100644
--- a/third_party/mojo/src/mojo/edk/test/multiprocess_test_helper.cc
+++ b/third_party/mojo/src/mojo/edk/test/multiprocess_test_helper.cc
@@ -26,6 +26,13 @@ MultiprocessTestHelper::~MultiprocessTestHelper() {
}
void MultiprocessTestHelper::StartChild(const std::string& test_child_name) {
+ StartChildWithExtraSwitch(test_child_name, std::string(), std::string());
+}
+
+void MultiprocessTestHelper::StartChildWithExtraSwitch(
+ const std::string& test_child_name,
+ const std::string& switch_string,
+ const std::string& switch_value) {
CHECK(platform_channel_pair_);
CHECK(!test_child_name.empty());
CHECK(!test_child_.IsValid());
@@ -38,6 +45,14 @@ void MultiprocessTestHelper::StartChild(const std::string& test_child_name) {
platform_channel_pair_->PrepareToPassClientHandleToChildProcess(
&command_line, &handle_passing_info);
+ if (!switch_string.empty()) {
+ CHECK(!command_line.HasSwitch(switch_string));
+ if (!switch_value.empty())
+ command_line.AppendSwitchASCII(switch_string, switch_value);
+ else
+ command_line.AppendSwitch(switch_string);
+ }
+
base::LaunchOptions options;
#if defined(OS_POSIX)
options.fds_to_remap = &handle_passing_info;
« no previous file with comments | « third_party/mojo/src/mojo/edk/test/multiprocess_test_helper.h ('k') | third_party/mojo/src/mojo/edk/test/scoped_ipc_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698