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

Unified Diff: mojo/edk/test/mojo_test_base.h

Issue 2227553002: Support mojo connections between unrelated peer processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/system/node_controller.cc ('k') | mojo/edk/test/mojo_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/test/mojo_test_base.h
diff --git a/mojo/edk/test/mojo_test_base.h b/mojo/edk/test/mojo_test_base.h
index 4f5514533a58de3112da5ab902686edb6a3bb90b..cd507daa81677dc07e9d3eb28ba3bfe5041de62d 100644
--- a/mojo/edk/test/mojo_test_base.h
+++ b/mojo/edk/test/mojo_test_base.h
@@ -29,6 +29,8 @@ class MojoTestBase : public testing::Test {
MojoTestBase();
~MojoTestBase() override;
+ using LaunchType = MultiprocessTestHelper::LaunchType;
+
protected:
using HandlerCallback = base::Callback<void(ScopedMessagePipeHandle)>;
@@ -36,7 +38,8 @@ class MojoTestBase : public testing::Test {
public:
ClientController(const std::string& client_name,
MojoTestBase* test,
- const ProcessErrorCallback& process_error_callback_);
+ const ProcessErrorCallback& process_error_callback,
+ LaunchType launch_type);
~ClientController();
MojoHandle pipe() const { return pipe_.get().value(); }
@@ -148,6 +151,8 @@ class MojoTestBase : public testing::Test {
// Reads data from a data pipe.
static std::string ReadData(MojoHandle consumer, size_t size);
+ void set_launch_type(LaunchType launch_type) { launch_type_ = launch_type; }
+
private:
friend class ClientController;
@@ -155,6 +160,8 @@ class MojoTestBase : public testing::Test {
ProcessErrorCallback process_error_callback_;
+ LaunchType launch_type_ = LaunchType::CHILD;
+
DISALLOW_COPY_AND_ASSIGN(MojoTestBase);
};
« no previous file with comments | « mojo/edk/system/node_controller.cc ('k') | mojo/edk/test/mojo_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698