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

Unified Diff: mojo/public/c/system/tests/core_unittest.cc

Issue 1885663002: EDK: Add implementation of data pipe producer write threshold stuff. (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
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 0ad52ad8cfcca67413c11d97925d2e3381559df3..071a902ed0fa7854da5f2e4366cdda2e69ca63b0 100644
--- a/mojo/public/c/system/tests/core_unittest.cc
+++ b/mojo/public/c/system/tests/core_unittest.cc
@@ -230,8 +230,10 @@ TEST(CoreTest, MAYBE_BasicDataPipe) {
// The producer |hp| should be writable.
EXPECT_EQ(MOJO_RESULT_OK,
MojoWait(hp, MOJO_HANDLE_SIGNAL_WRITABLE, 0, &state));
- EXPECT_EQ(MOJO_HANDLE_SIGNAL_WRITABLE, state.satisfied_signals);
- EXPECT_EQ(MOJO_HANDLE_SIGNAL_WRITABLE | MOJO_HANDLE_SIGNAL_PEER_CLOSED,
+ EXPECT_EQ(MOJO_HANDLE_SIGNAL_WRITABLE | MOJO_HANDLE_SIGNAL_WRITE_THRESHOLD,
+ state.satisfied_signals);
+ EXPECT_EQ(MOJO_HANDLE_SIGNAL_WRITABLE | MOJO_HANDLE_SIGNAL_PEER_CLOSED |
+ MOJO_HANDLE_SIGNAL_WRITE_THRESHOLD,
state.satisfiable_signals);
// Try to read from |hc|.
@@ -315,12 +317,15 @@ TEST(CoreTest, MAYBE_BasicDataPipe) {
// the producer never-writable?
}
+// TODO(vtl): Once thunks are in: TEST(CoreTest, DataPipeWriteThreshold) { ... }
+
TEST(CoreTest, DataPipeReadThreshold) {
MojoHandle hp = MOJO_HANDLE_INVALID;
MojoHandle hc = MOJO_HANDLE_INVALID;
EXPECT_EQ(MOJO_RESULT_OK, MojoCreateDataPipe(nullptr, &hp, &hc));
EXPECT_NE(hp, MOJO_HANDLE_INVALID);
EXPECT_NE(hc, MOJO_HANDLE_INVALID);
+ EXPECT_NE(hc, hp);
MojoDataPipeConsumerOptions copts;
static const uint32_t kCoptsSize = static_cast<uint32_t>(sizeof(copts));
« no previous file with comments | « mojo/edk/system/remote_consumer_data_pipe_impl.cc ('k') | mojo/public/platform/native/system_impl_private_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698