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

Unified Diff: util/mach/bootstrap_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 | « no previous file | util/mach/exc_server_variants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/bootstrap_test.cc
diff --git a/util/mach/bootstrap_test.cc b/util/mach/bootstrap_test.cc
index fbf69cad16d38cebf05213989e096e08e108dc5d..2b8afe0fb4a5b505125693b0e2ffd5bae558757c 100644
--- a/util/mach/bootstrap_test.cc
+++ b/util/mach/bootstrap_test.cc
@@ -25,6 +25,7 @@
#include "base/mac/scoped_mach_port.h"
#include "base/rand_util.h"
#include "gtest/gtest.h"
+#include "util/mach/mach_extensions.h"
#include "util/test/mac/mach_errors.h"
namespace {
@@ -51,21 +52,21 @@ TEST(Bootstrap, BootstrapCheckIn) {
kr = BootstrapCheckIn(bootstrap_port, service_name.c_str(), &server_port);
ASSERT_EQ(BOOTSTRAP_SUCCESS, kr)
<< BootstrapErrorMessage(kr, "bootstrap_check_in");
- ASSERT_NE(static_cast<mach_port_t>(MACH_PORT_NULL), server_port);
+ ASSERT_NE(kMachPortNull, server_port);
base::mac::ScopedMachReceiveRight server_port_owner(server_port);
// A subsequent checkin attempt should fail.
mach_port_t fail_port = MACH_PORT_NULL;
kr = BootstrapCheckIn(bootstrap_port, service_name.c_str(), &fail_port);
EXPECT_EQ(BOOTSTRAP_SERVICE_ACTIVE, kr);
- EXPECT_EQ(static_cast<mach_port_t>(MACH_PORT_NULL), fail_port);
+ EXPECT_EQ(kMachPortNull, fail_port);
// Look up the service, getting a send right.
kr = bootstrap_look_up(bootstrap_port, service_name.c_str(), &client_port);
ASSERT_EQ(BOOTSTRAP_SUCCESS, kr)
<< BootstrapErrorMessage(kr, "bootstrap_look_up");
base::mac::ScopedMachSendRight client_port_owner(client_port);
- EXPECT_NE(static_cast<mach_port_t>(MACH_PORT_NULL), client_port);
+ EXPECT_NE(kMachPortNull, client_port);
// Have the “client” send a message to the “server”.
struct SendMessage {
« no previous file with comments | « no previous file | util/mach/exc_server_variants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698