| 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..4f5514533a58de3112da5ab902686edb6a3bb90b 100644
|
| --- a/mojo/edk/test/mojo_test_base.h
|
| +++ b/mojo/edk/test/mojo_test_base.h
|
| @@ -34,7 +34,9 @@ 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 ProcessErrorCallback& process_error_callback_);
|
| ~ClientController();
|
|
|
| MojoHandle pipe() const { return pipe_.get().value(); }
|
| @@ -53,6 +55,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_process_error_callback(const ProcessErrorCallback& callback) {
|
| + process_error_callback_ = callback;
|
| + }
|
| +
|
| ClientController& StartClient(const std::string& client_name);
|
|
|
| template <typename HandlerFunc>
|
| @@ -144,6 +153,8 @@ class MojoTestBase : public testing::Test {
|
|
|
| std::vector<std::unique_ptr<ClientController>> clients_;
|
|
|
| + ProcessErrorCallback process_error_callback_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(MojoTestBase);
|
| };
|
|
|
|
|