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

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

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC Created 6 years 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/raw_channel.cc ('k') | mojo/edk/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/remote_message_pipe_unittest.cc
diff --git a/mojo/edk/system/remote_message_pipe_unittest.cc b/mojo/edk/system/remote_message_pipe_unittest.cc
index 8a02f2e4de9970d23fd566b8b9a1c320fde9f1e3..53e6a53fea795a715059aa03e814b1a6c573f659 100644
--- a/mojo/edk/system/remote_message_pipe_unittest.cc
+++ b/mojo/edk/system/remote_message_pipe_unittest.cc
@@ -331,12 +331,19 @@ TEST_F(RemoteMessagePipeTest, Multiplex) {
// via |ep0| (i.e., sent using |mp0|, port 0) with this remote ID. Upon
// receiving this message, |PassIncomingMessagePipe()| is used to obtain the
// message pipe on the other side.
- scoped_refptr<ChannelEndpoint> ep2;
- scoped_refptr<MessagePipe> mp2(MessagePipe::CreateLocalProxy(&ep2));
+ scoped_refptr<MessagePipe> mp2(MessagePipe::CreateLocalLocal());
ASSERT_TRUE(channels(0));
- size_t endpoint_info_size = channels(0)->GetSerializedEndpointSize();
- scoped_ptr<char[]> endpoint_info(new char[endpoint_info_size]);
- channels(0)->SerializeEndpoint(ep2, endpoint_info.get());
+ size_t max_endpoint_info_size;
+ size_t max_platform_handle_count;
+ mp2->StartSerialize(1, channels(0), &max_endpoint_info_size,
+ &max_platform_handle_count);
+ EXPECT_GT(max_endpoint_info_size, 0u);
+ ASSERT_EQ(0u, max_platform_handle_count);
+ scoped_ptr<char[]> endpoint_info(new char[max_endpoint_info_size]);
+ size_t endpoint_info_size;
+ mp2->EndSerialize(1, channels(0), endpoint_info.get(), &endpoint_info_size,
+ nullptr);
+ EXPECT_EQ(max_endpoint_info_size, endpoint_info_size);
waiter.Init();
ASSERT_EQ(
« no previous file with comments | « mojo/edk/system/raw_channel.cc ('k') | mojo/edk/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698