| Index: mojo/public/c/system/tests/core_unittest.cc
|
| diff --git a/mojo/public/c/system/tests/core_unittest.cc b/mojo/public/c/system/tests/core_unittest.cc
|
| index f7186337eba4362d55abea03a6547342c537e779..0ad52ad8cfcca67413c11d97925d2e3381559df3 100644
|
| --- a/mojo/public/c/system/tests/core_unittest.cc
|
| +++ b/mojo/public/c/system/tests/core_unittest.cc
|
| @@ -411,6 +411,19 @@ TEST(CoreTest, DataPipeReadThreshold) {
|
| EXPECT_EQ(MOJO_RESULT_OK,
|
| MojoWait(hc, MOJO_HANDLE_SIGNAL_READ_THRESHOLD, 0, nullptr));
|
|
|
| + // Set the read threshold to the default by passing null, and check it.
|
| + EXPECT_EQ(MOJO_RESULT_OK, MojoSetDataPipeConsumerOptions(hc, nullptr));
|
| +
|
| + memset(&copts, 255, kCoptsSize);
|
| + EXPECT_EQ(MOJO_RESULT_OK,
|
| + MojoGetDataPipeConsumerOptions(hc, &copts, kCoptsSize));
|
| + EXPECT_EQ(kCoptsSize, copts.struct_size);
|
| + EXPECT_EQ(0u, copts.read_threshold_num_bytes);
|
| +
|
| + // Should still have the read threshold signal.
|
| + EXPECT_EQ(MOJO_RESULT_OK,
|
| + MojoWait(hc, MOJO_HANDLE_SIGNAL_READ_THRESHOLD, 0, nullptr));
|
| +
|
| EXPECT_EQ(MOJO_RESULT_OK, MojoClose(hp));
|
| EXPECT_EQ(MOJO_RESULT_OK, MojoClose(hc));
|
| }
|
|
|