| 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 3d5e56e3d1581fcd800a75320a9a212eded4ba99..94affc281b97691d5d3e7dc8d402d532a31a3aeb 100644
|
| --- a/mojo/edk/test/mojo_test_base.h
|
| +++ b/mojo/edk/test/mojo_test_base.h
|
| @@ -34,13 +34,17 @@ class MojoTestBase : public testing::Test {
|
|
|
| class ClientController {
|
| public:
|
| - ClientController(const std::string& client_name, MojoTestBase* test);
|
| + ClientController(const std::string& client_name,
|
| + MojoTestBase* test,
|
| + const base::Closure& bad_message_callback);
|
| ~ClientController();
|
|
|
| MojoHandle pipe() const { return pipe_.get().value(); }
|
|
|
| int WaitForShutdown();
|
|
|
| + MultiprocessTestHelper& helper() { return helper_; }
|
| +
|
| private:
|
| friend class MojoTestBase;
|
|
|
| @@ -53,6 +57,13 @@ class MojoTestBase : public testing::Test {
|
| DISALLOW_COPY_AND_ASSIGN(ClientController);
|
| };
|
|
|
| + // Set the callback to handle bad messages received from test client
|
| + // processes. This can be set to a different callback before starting each
|
| + // client.
|
| + void set_bad_message_callback(const base::Closure& callback) {
|
| + bad_message_callback_ = callback;
|
| + }
|
| +
|
| ClientController& StartClient(const std::string& client_name);
|
|
|
| template <typename HandlerFunc>
|
| @@ -144,6 +155,8 @@ class MojoTestBase : public testing::Test {
|
|
|
| std::vector<std::unique_ptr<ClientController>> clients_;
|
|
|
| + base::Closure bad_message_callback_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(MojoTestBase);
|
| };
|
|
|
|
|