| Index: mojo/public/tests/system_core_perftest.cc
|
| diff --git a/mojo/public/tests/system_core_perftest.cc b/mojo/public/tests/system_core_perftest.cc
|
| index 2e9fef22a078b5c58e3536f8d3dfa7d6b8225dc1..8ee7ceb2cc7be1e8015c180a0bae534f84fe9e5b 100644
|
| --- a/mojo/public/tests/system_core_perftest.cc
|
| +++ b/mojo/public/tests/system_core_perftest.cc
|
| @@ -45,6 +45,15 @@ class SystemPerftest : public test::TestBase {
|
| DCHECK_EQ(result, MOJO_RESULT_OK);
|
| }
|
|
|
| + void MessagePipe_EmptyRead() {
|
| + MojoResult result;
|
| + result = ReadMessage(h_0_,
|
| + NULL, NULL,
|
| + NULL, NULL,
|
| + MOJO_READ_MESSAGE_FLAG_MAY_DISCARD);
|
| + DCHECK_EQ(result, MOJO_RESULT_NOT_FOUND);
|
| + }
|
| +
|
| protected:
|
| Handle h_0_;
|
| Handle h_1_;
|
| @@ -95,5 +104,15 @@ TEST_F(SystemPerftest, MessagePipe_WriteAndRead) {
|
| CHECK_EQ(Close(h_1_), MOJO_RESULT_OK);
|
| }
|
|
|
| +TEST_F(SystemPerftest, MessagePipe_EmptyRead) {
|
| + CHECK_EQ(CreateMessagePipe(&h_0_, &h_1_), MOJO_RESULT_OK);
|
| + test::IterateAndReportPerf(
|
| + "MessagePipe_EmptyRead",
|
| + base::Bind(&SystemPerftest::MessagePipe_EmptyRead,
|
| + base::Unretained(this)));
|
| + CHECK_EQ(Close(h_0_), MOJO_RESULT_OK);
|
| + CHECK_EQ(Close(h_1_), MOJO_RESULT_OK);
|
| +}
|
| +
|
| } // namespace
|
| } // namespace mojo
|
|
|