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

Unified Diff: util/mach/mach_message_server_test.cc

Issue 545053003: Add exc_server_variants including UniversalMachExcServer and its test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 6 years, 3 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 | « util/mach/mach_extensions.h ('k') | util/test/mac/mach_multiprocess.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/mach_message_server_test.cc
diff --git a/util/mach/mach_message_server_test.cc b/util/mach/mach_message_server_test.cc
index 08c781d14dc992fbfaebfa64d2ed65bc777807f1..311a546ac7feee3704d76eea4d2180472f65a712 100644
--- a/util/mach/mach_message_server_test.cc
+++ b/util/mach/mach_message_server_test.cc
@@ -21,6 +21,7 @@
#include "base/mac/scoped_mach_port.h"
#include "gtest/gtest.h"
#include "util/file/fd_io.h"
+#include "util/mach/mach_extensions.h"
#include "util/test/errors.h"
#include "util/test/mac/mach_errors.h"
#include "util/test/mac/mach_multiprocess.h"
@@ -214,8 +215,7 @@ class TestMachMessageServer : public MachMessageServer::Interface,
EXPECT_EQ(kRequestMessageId, request->header.msgh_id);
if (options_.client_send_complex) {
EXPECT_EQ(1u, request->body.msgh_descriptor_count);
- EXPECT_NE(static_cast<mach_port_t>(MACH_PORT_NULL),
- request->port_descriptor.name);
+ EXPECT_NE(kMachPortNull, request->port_descriptor.name);
parent_complex_message_port_ = request->port_descriptor.name;
EXPECT_EQ(static_cast<mach_msg_type_name_t>(MACH_MSG_TYPE_MOVE_SEND),
request->port_descriptor.disposition);
@@ -224,8 +224,7 @@ class TestMachMessageServer : public MachMessageServer::Interface,
request->port_descriptor.type);
} else {
EXPECT_EQ(0u, request->body.msgh_descriptor_count);
- EXPECT_EQ(static_cast<mach_port_t>(MACH_PORT_NULL),
- request->port_descriptor.name);
+ EXPECT_EQ(kMachPortNull, request->port_descriptor.name);
EXPECT_EQ(0u, request->port_descriptor.disposition);
EXPECT_EQ(0u, request->port_descriptor.type);
}
@@ -318,8 +317,7 @@ class TestMachMessageServer : public MachMessageServer::Interface,
<< MachErrorMessage(kr, "MachMessageServer");
if (options_.client_send_complex) {
- EXPECT_NE(static_cast<mach_port_t>(MACH_PORT_NULL),
- parent_complex_message_port_);
+ EXPECT_NE(kMachPortNull, parent_complex_message_port_);
mach_port_type_t type;
if (!options_.expect_server_destroyed_complex) {
@@ -505,8 +503,7 @@ class TestMachMessageServer : public MachMessageServer::Interface,
ASSERT_EQ(static_cast<mach_msg_bits_t>(
MACH_MSGH_BITS(0, MACH_MSG_TYPE_MOVE_SEND)), reply.Head.msgh_bits);
ASSERT_EQ(sizeof(ReplyMessage), reply.Head.msgh_size);
- ASSERT_EQ(static_cast<mach_port_t>(MACH_PORT_NULL),
- reply.Head.msgh_remote_port);
+ ASSERT_EQ(kMachPortNull, reply.Head.msgh_remote_port);
ASSERT_EQ(LocalPort(), reply.Head.msgh_local_port);
ASSERT_EQ(kReplyMessageId, reply.Head.msgh_id);
ASSERT_EQ(0, memcmp(&reply.NDR, &NDR_record, sizeof(NDR_record)));
« no previous file with comments | « util/mach/mach_extensions.h ('k') | util/test/mac/mach_multiprocess.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698