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

Unified Diff: ipc/mojo/ipc_channel_mojo_unittest.cc

Issue 2047953002: Explicitly serialise platform file attachments instead of doing them implicitly as a mojo handle at… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « ipc/mojo/ipc_channel_mojo.cc ('k') | ipc/mojo/ipc_mojo_handle_attachment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mojo/ipc_channel_mojo_unittest.cc
diff --git a/ipc/mojo/ipc_channel_mojo_unittest.cc b/ipc/mojo/ipc_channel_mojo_unittest.cc
index 613b2e2611607c514809e2a296b5495835391ca9..40525591eca953fadc32069d331dcc2924cc380b 100644
--- a/ipc/mojo/ipc_channel_mojo_unittest.cc
+++ b/ipc/mojo/ipc_channel_mojo_unittest.cc
@@ -362,6 +362,9 @@ class HandleSendingHelper {
base::ScopedFD fd;
scoped_refptr<base::Pickle::Attachment> attachment;
EXPECT_TRUE(message.ReadAttachment(iter, &attachment));
+ EXPECT_EQ(IPC::MessageAttachment::TYPE_PLATFORM_FILE,
+ static_cast<IPC::MessageAttachment*>(attachment.get())
+ ->GetType());
base::File file(static_cast<IPC::MessageAttachment*>(attachment.get())
->TakePlatformFile());
std::string content(GetSendingFileContent().size(), ' ');
« no previous file with comments | « ipc/mojo/ipc_channel_mojo.cc ('k') | ipc/mojo/ipc_mojo_handle_attachment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698