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

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

Issue 2084593005: Rationalize AddAwakable...() and RemoveAwakable...() methods. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 4 years, 6 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/edk/system/dispatcher_unittest.cc ('k') | mojo/edk/system/local_message_pipe_endpoint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/ipc_support_unittest.cc
diff --git a/mojo/edk/system/ipc_support_unittest.cc b/mojo/edk/system/ipc_support_unittest.cc
index f271c715db2f9ffa2feb3850bf2983574eb773d1..676a8ee59649ef08e241ec1c718e732dfd7a453b 100644
--- a/mojo/edk/system/ipc_support_unittest.cc
+++ b/mojo/edk/system/ipc_support_unittest.cc
@@ -52,9 +52,9 @@ void TestWriteReadMessage(MessagePipeDispatcher* write_mp,
// Set up waiting on the read end first (to avoid racing).
Waiter waiter;
waiter.Init();
- ASSERT_EQ(
- MOJO_RESULT_OK,
- read_mp->AddAwakable(&waiter, MOJO_HANDLE_SIGNAL_READABLE, 0, nullptr));
+ ASSERT_EQ(MOJO_RESULT_OK,
+ read_mp->AddAwakable(&waiter, 0, false, MOJO_HANDLE_SIGNAL_READABLE,
+ nullptr));
// Write a message with just 'x' through the write end.
EXPECT_EQ(MOJO_RESULT_OK,
@@ -64,7 +64,7 @@ void TestWriteReadMessage(MessagePipeDispatcher* write_mp,
// Wait for it to arrive.
EXPECT_EQ(MOJO_RESULT_OK,
waiter.Wait(test::ActionTimeout(), nullptr, nullptr));
- read_mp->RemoveAwakable(&waiter, nullptr);
+ read_mp->RemoveAwakable(false, &waiter, 0, nullptr);
// Read the message from the read end.
char buffer[10] = {};
@@ -94,9 +94,9 @@ RefPtr<MessagePipeDispatcher> SendMessagePipeDispatcher(
// Set up waiting on the read end first (to avoid racing).
Waiter waiter;
waiter.Init();
- CHECK_EQ(
- read_mp->AddAwakable(&waiter, MOJO_HANDLE_SIGNAL_READABLE, 0, nullptr),
- MOJO_RESULT_OK);
+ CHECK_EQ(read_mp->AddAwakable(&waiter, 0, false, MOJO_HANDLE_SIGNAL_READABLE,
+ nullptr),
+ MOJO_RESULT_OK);
// Write a message with just |mp_handle_to_send| through the write end.
HandleTransport transport(test::HandleTryStartTransport(mp_handle_to_send));
@@ -112,7 +112,7 @@ RefPtr<MessagePipeDispatcher> SendMessagePipeDispatcher(
// Wait for it to arrive.
CHECK_EQ(waiter.Wait(test::ActionTimeout(), nullptr, nullptr),
MOJO_RESULT_OK);
- read_mp->RemoveAwakable(&waiter, nullptr);
+ read_mp->RemoveAwakable(false, &waiter, 0, nullptr);
// Read the message from the read end.
HandleVector handles;
« no previous file with comments | « mojo/edk/system/dispatcher_unittest.cc ('k') | mojo/edk/system/local_message_pipe_endpoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698