Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: mojo/edk/system/core_unittest.cc

Issue 1865663002: Let MojoSetDataPipeConsumerOptions() take null options. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/edk/system/data_pipe_consumer_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core_unittest.cc
diff --git a/mojo/edk/system/core_unittest.cc b/mojo/edk/system/core_unittest.cc
index 0fdd5acaa62ed013a83295a3819fb88d35b5bcc5..bb8967a08f2567334803b5aa5c6bbfda9dd4fbff 100644
--- a/mojo/edk/system/core_unittest.cc
+++ b/mojo/edk/system/core_unittest.cc
@@ -1250,11 +1250,9 @@ TEST_F(CoreTest, DataPipeSetGetConsumerOptions) {
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));
« no previous file with comments | « no previous file | mojo/edk/system/data_pipe_consumer_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698