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

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

Issue 1946423002: EDK: Remove Core::AddDispatcher(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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/data_pipe_consumer_dispatcher.cc ('k') | mojo/edk/system/data_pipe_producer_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/data_pipe_impl_unittest.cc
diff --git a/mojo/edk/system/data_pipe_impl_unittest.cc b/mojo/edk/system/data_pipe_impl_unittest.cc
index 985b401b6bb55835132d21fe38c08985c31182dd..8841fd47dd497f084b44d57e801275d9e9f1b321 100644
--- a/mojo/edk/system/data_pipe_impl_unittest.cc
+++ b/mojo/edk/system/data_pipe_impl_unittest.cc
@@ -385,9 +385,8 @@ class RemoteProducerDataPipeImplTestHelper
// This is the producer dispatcher we'll send.
auto to_send = DataPipeProducerDispatcher::Create();
to_send->Init(dp());
- Handle handle_to_send(std::move(to_send), MOJO_HANDLE_RIGHT_TRANSFER |
- MOJO_HANDLE_RIGHT_READ |
- MOJO_HANDLE_RIGHT_WRITE);
+ Handle handle_to_send(std::move(to_send),
+ DataPipeProducerDispatcher::kDefaultHandleRights);
RefPtr<Dispatcher> to_receive;
SendHandle(0, handle_to_send, &to_receive);
// |handle_to_send.dispatcher| should have been closed. This is |DCHECK()|ed
@@ -437,9 +436,8 @@ class RemoteConsumerDataPipeImplTestHelper
// This is the consumer dispatcher we'll send.
auto to_send = DataPipeConsumerDispatcher::Create();
to_send->Init(dp());
- Handle handle_to_send(std::move(to_send), MOJO_HANDLE_RIGHT_TRANSFER |
- MOJO_HANDLE_RIGHT_READ |
- MOJO_HANDLE_RIGHT_WRITE);
+ Handle handle_to_send(std::move(to_send),
+ DataPipeConsumerDispatcher::kDefaultHandleRights);
RefPtr<Dispatcher> to_receive;
SendHandle(0, handle_to_send, &to_receive);
// |handle_to_send.dispatcher| should have been closed. This is |DCHECK()|ed
@@ -494,9 +492,8 @@ class RemoteProducerDataPipeImplTestHelper2
// This is the producer dispatcher we'll send.
auto to_send = DataPipeProducerDispatcher::Create();
to_send->Init(dp());
- Handle handle_to_send(std::move(to_send), MOJO_HANDLE_RIGHT_TRANSFER |
- MOJO_HANDLE_RIGHT_READ |
- MOJO_HANDLE_RIGHT_WRITE);
+ Handle handle_to_send(std::move(to_send),
+ DataPipeProducerDispatcher::kDefaultHandleRights);
RefPtr<Dispatcher> to_receive;
SendHandle(0, handle_to_send, &to_receive);
// |handle_to_send.dispatcher| should have been closed. This is |DCHECK()|ed
@@ -504,9 +501,8 @@ class RemoteProducerDataPipeImplTestHelper2
EXPECT_TRUE(handle_to_send.dispatcher->HasOneRef());
handle_to_send.reset();
ASSERT_EQ(Dispatcher::Type::DATA_PIPE_PRODUCER, to_receive->GetType());
- handle_to_send = Handle(std::move(to_receive), MOJO_HANDLE_RIGHT_TRANSFER |
- MOJO_HANDLE_RIGHT_READ |
- MOJO_HANDLE_RIGHT_WRITE);
+ handle_to_send = Handle(std::move(to_receive),
+ DataPipeProducerDispatcher::kDefaultHandleRights);
// Now send it back the other way.
SendHandle(1, handle_to_send, &to_receive);
@@ -544,9 +540,8 @@ class RemoteConsumerDataPipeImplTestHelper2
// This is the consumer dispatcher we'll send.
auto to_send = DataPipeConsumerDispatcher::Create();
to_send->Init(dp());
- Handle handle_to_send(std::move(to_send), MOJO_HANDLE_RIGHT_TRANSFER |
- MOJO_HANDLE_RIGHT_READ |
- MOJO_HANDLE_RIGHT_WRITE);
+ Handle handle_to_send(std::move(to_send),
+ DataPipeConsumerDispatcher::kDefaultHandleRights);
RefPtr<Dispatcher> to_receive;
SendHandle(0, handle_to_send, &to_receive);
// |handle_to_send.dispatcher| should have been closed. This is |DCHECK()|ed
@@ -554,9 +549,8 @@ class RemoteConsumerDataPipeImplTestHelper2
EXPECT_TRUE(handle_to_send.dispatcher->HasOneRef());
handle_to_send.reset();
ASSERT_EQ(Dispatcher::Type::DATA_PIPE_CONSUMER, to_receive->GetType());
- handle_to_send = Handle(std::move(to_receive), MOJO_HANDLE_RIGHT_TRANSFER |
- MOJO_HANDLE_RIGHT_READ |
- MOJO_HANDLE_RIGHT_WRITE);
+ handle_to_send = Handle(std::move(to_receive),
+ DataPipeConsumerDispatcher::kDefaultHandleRights);
// Now send it back the other way.
SendHandle(1, handle_to_send, &to_receive);
« no previous file with comments | « mojo/edk/system/data_pipe_consumer_dispatcher.cc ('k') | mojo/edk/system/data_pipe_producer_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698