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

Unified Diff: mojo/public/cpp/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/public/cpp/environment/logging.h ('k') | mojo/shell/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/system/tests/core_unittest.cc
diff --git a/mojo/public/cpp/system/tests/core_unittest.cc b/mojo/public/cpp/system/tests/core_unittest.cc
index b3ebea2d202a1f1f4ffde43b8c370997e8b76168..c717c2f205be257c69d73273ee93168d553a2d0d 100644
--- a/mojo/public/cpp/system/tests/core_unittest.cc
+++ b/mojo/public/cpp/system/tests/core_unittest.cc
@@ -365,8 +365,12 @@ TEST(CoreCppTest, TearDownWithMessagesEnqueued) {
// Send a handle over the previously-establish message pipe.
ScopedMessagePipeHandle h2;
- ScopedMessagePipeHandle h3;
- CreateMessagePipe(nullptr, &h2, &h3);
+ ScopedMessagePipeHandle h3;
+ MojoCreateMessagePipeOptions options;
+ options.struct_size = sizeof(MojoCreateMessagePipeOptions);
+ options.flags = MOJO_CREATE_MESSAGE_PIPE_OPTIONS_FLAG_TRANSFERABLE;
+ if (CreateMessagePipe(&options, &h2, &h3) != MOJO_RESULT_OK)
+ CreateMessagePipe(nullptr, &h2, &h3); // Must be old EDK.
// Write a message to |h2|, before we send |h3|.
const char kWorld[] = "world!";
@@ -418,8 +422,12 @@ TEST(CoreCppTest, TearDownWithMessagesEnqueued) {
// Send a handle over the previously-establish message pipe.
ScopedMessagePipeHandle h2;
- ScopedMessagePipeHandle h3;
- CreateMessagePipe(nullptr, &h2, &h3);
+ ScopedMessagePipeHandle h3;
+ MojoCreateMessagePipeOptions options;
+ options.struct_size = sizeof(MojoCreateMessagePipeOptions);
+ options.flags = MOJO_CREATE_MESSAGE_PIPE_OPTIONS_FLAG_TRANSFERABLE;
+ if (CreateMessagePipe(&options, &h2, &h3) != MOJO_RESULT_OK)
+ CreateMessagePipe(nullptr, &h2, &h3); // Must be old EDK.
// Write a message to |h2|, before we send |h3|.
const char kWorld[] = "world!";
« no previous file with comments | « mojo/public/cpp/environment/logging.h ('k') | mojo/shell/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698