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

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: review comments 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
« no previous file with comments | « mojo/message_pump/message_pump_mojo_unittest.cc ('k') | mojo/public/cpp/bindings/lib/validation_errors.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
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);
« no previous file with comments | « mojo/message_pump/message_pump_mojo_unittest.cc ('k') | mojo/public/cpp/bindings/lib/validation_errors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698