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

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

Issue 1552983003: Fix a bunch of mojo_public_*_unittests with the new EDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 a5cb2d7d9e4a2072d22314272cdb50e0b6ea1dc8..ef44a8748816157d354e673ed39937ed263c2aaf 100644
--- a/mojo/public/c/system/tests/core_unittest.cc
+++ b/mojo/public/c/system/tests/core_unittest.cc
@@ -156,6 +156,10 @@ TEST(CoreTest, BasicMessagePipe) {
// Close |h0|.
EXPECT_EQ(MOJO_RESULT_OK, MojoClose(h0));
+ EXPECT_EQ(MOJO_RESULT_OK,
+ MojoWait(h1, MOJO_HANDLE_SIGNAL_PEER_CLOSED,
+ MOJO_DEADLINE_INDEFINITE, &state));
+
// |h1| should no longer be readable or writable.
EXPECT_EQ(
MOJO_RESULT_FAILED_PRECONDITION,
@@ -250,7 +254,8 @@ TEST(CoreTest, BasicDataPipe) {
// |hc| should still be readable.
yzshen1 2016/01/04 18:54:25 nit: Maybe we could consider keeping the wait for
jam 2016/01/04 21:00:06 well, we still do that check for readable in line
EXPECT_EQ(MOJO_RESULT_OK,
- MojoWait(hc, MOJO_HANDLE_SIGNAL_READABLE, 0, &state));
+ MojoWait(hc, MOJO_HANDLE_SIGNAL_PEER_CLOSED,
+ MOJO_DEADLINE_INDEFINITE, &state));
EXPECT_EQ(MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_PEER_CLOSED,
state.satisfied_signals);

Powered by Google App Engine
This is Rietveld 408576698