Let MojoSetDataPipeConsumerOptions() take null options.
The header defining it says that doing so means reset back to the
default options. I forgot about this when implementing it. Oops. :-/
R=vardhan@google.com
BUG=#442
Review URL: https://codereview.chromium.org/1865663002 .
diff --git a/mojo/edk/system/core_unittest.cc b/mojo/edk/system/core_unittest.cc
index 0fdd5ac..bb8967a 100644
--- a/mojo/edk/system/core_unittest.cc
+++ b/mojo/edk/system/core_unittest.cc
@@ -1250,11 +1250,9 @@
EXPECT_EQ(kCoptsSize, copts.struct_size);
EXPECT_EQ(16u, copts.read_threshold_num_bytes);
- // Default read threshold.
- copts.struct_size = kCoptsSize;
- copts.read_threshold_num_bytes = 0;
+ // Can also set to default by passing null.
EXPECT_EQ(MOJO_RESULT_OK,
- core()->SetDataPipeConsumerOptions(ch, MakeUserPointer(&copts)));
+ core()->SetDataPipeConsumerOptions(ch, NullUserPointer()));
copts = MojoDataPipeConsumerOptions();
EXPECT_EQ(MOJO_RESULT_OK, core()->GetDataPipeConsumerOptions(
ch, MakeUserPointer(&copts), kCoptsSize));