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

Unified Diff: util/mach/mach_extensions_test.cc

Issue 1405273002: Mach port scopers should use get() instead of type conversion operators (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: More is_valid() Created 5 years, 2 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/exception_ports_test.cc ('k') | util/mach/mach_message_server_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/mach_extensions_test.cc
diff --git a/util/mach/mach_extensions_test.cc b/util/mach/mach_extensions_test.cc
index 2b987b375fac6692be4dbd28c2448a2d40076aad..04af5dfe58c2f3ccd2a47c673feefb6089fd1051 100644
--- a/util/mach/mach_extensions_test.cc
+++ b/util/mach/mach_extensions_test.cc
@@ -34,7 +34,7 @@ TEST(MachExtensions, NewMachPort_Receive) {
ASSERT_NE(kMachPortNull, port);
mach_port_type_t type;
- kern_return_t kr = mach_port_type(mach_task_self(), port, &type);
+ kern_return_t kr = mach_port_type(mach_task_self(), port.get(), &type);
ASSERT_EQ(KERN_SUCCESS, kr) << MachErrorMessage(kr, "mach_port_get_type");
EXPECT_EQ(MACH_PORT_TYPE_RECEIVE, type);
@@ -45,7 +45,7 @@ TEST(MachExtensions, NewMachPort_PortSet) {
ASSERT_NE(kMachPortNull, port);
mach_port_type_t type;
- kern_return_t kr = mach_port_type(mach_task_self(), port, &type);
+ kern_return_t kr = mach_port_type(mach_task_self(), port.get(), &type);
ASSERT_EQ(KERN_SUCCESS, kr) << MachErrorMessage(kr, "mach_port_get_type");
EXPECT_EQ(MACH_PORT_TYPE_PORT_SET, type);
@@ -56,7 +56,7 @@ TEST(MachExtensions, NewMachPort_DeadName) {
ASSERT_NE(kMachPortNull, port);
mach_port_type_t type;
- kern_return_t kr = mach_port_type(mach_task_self(), port, &type);
+ kern_return_t kr = mach_port_type(mach_task_self(), port.get(), &type);
ASSERT_EQ(KERN_SUCCESS, kr) << MachErrorMessage(kr, "mach_port_get_type");
EXPECT_EQ(MACH_PORT_TYPE_DEAD_NAME, type);
@@ -173,7 +173,7 @@ TEST(MachExtensions, BootstrapCheckInAndLookUp) {
TEST(MachExtensions, SystemCrashReporterHandler) {
base::mac::ScopedMachSendRight
system_crash_reporter_handler(SystemCrashReporterHandler());
- EXPECT_TRUE(system_crash_reporter_handler);
+ EXPECT_TRUE(system_crash_reporter_handler.is_valid());
}
} // namespace
« no previous file with comments | « util/mach/exception_ports_test.cc ('k') | util/mach/mach_message_server_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698