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

Unified Diff: ipc/attachment_broker_privileged_mac_unittest.cc

Issue 1778203002: Move mach code shared by Chrome IPC and Mojo to //base/mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enum for error code Created 4 years, 9 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/attachment_broker_privileged_mac.cc ('k') | ipc/attachment_broker_unprivileged_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/attachment_broker_privileged_mac_unittest.cc
diff --git a/ipc/attachment_broker_privileged_mac_unittest.cc b/ipc/attachment_broker_privileged_mac_unittest.cc
index 15aecb66211eff33335c044337e2947af3787540..dbecc735c149c190062045732dda05d96b99ad4a 100644
--- a/ipc/attachment_broker_privileged_mac_unittest.cc
+++ b/ipc/attachment_broker_privileged_mac_unittest.cc
@@ -14,6 +14,7 @@
#include "base/command_line.h"
#include "base/mac/mac_util.h"
#include "base/mac/mach_logging.h"
+#include "base/mac/mach_port_util.h"
#include "base/mac/scoped_mach_port.h"
#include "base/macros.h"
#include "base/memory/shared_memory.h"
@@ -198,9 +199,10 @@ TEST_F(AttachmentBrokerPrivilegedMacMultiProcessTest, InsertRight) {
// port.
IncrementMachRefCount(shared_memory->handle().GetMemoryObject(),
MACH_PORT_RIGHT_SEND);
- mach_port_name_t inserted_memory_object = broker.CreateIntermediateMachPort(
- client_task_port_.get(), base::mac::ScopedMachSendRight(
- shared_memory->handle().GetMemoryObject()));
+ mach_port_name_t inserted_memory_object = base::CreateIntermediateMachPort(
+ client_task_port_.get(),
+ base::mac::ScopedMachSendRight(shared_memory->handle().GetMemoryObject()),
+ nullptr);
EXPECT_NE(inserted_memory_object,
static_cast<mach_port_name_t>(MACH_PORT_NULL));
SendUInt32(client_port_.get(), inserted_memory_object);
@@ -266,10 +268,11 @@ TEST_F(AttachmentBrokerPrivilegedMacMultiProcessTest, InsertSameRightTwice) {
for (int i = 0; i < 2; ++i) {
IncrementMachRefCount(shared_memory->handle().GetMemoryObject(),
MACH_PORT_RIGHT_SEND);
- mach_port_name_t inserted_memory_object = broker.CreateIntermediateMachPort(
+ mach_port_name_t inserted_memory_object = base::CreateIntermediateMachPort(
client_task_port_.get(),
base::mac::ScopedMachSendRight(
- shared_memory->handle().GetMemoryObject()));
+ shared_memory->handle().GetMemoryObject()),
+ nullptr);
EXPECT_NE(inserted_memory_object,
static_cast<mach_port_name_t>(MACH_PORT_NULL));
SendUInt32(client_port_.get(), inserted_memory_object);
@@ -362,10 +365,11 @@ TEST_F(AttachmentBrokerPrivilegedMacMultiProcessTest, InsertTwoRights) {
// port.
IncrementMachRefCount(shared_memory->handle().GetMemoryObject(),
MACH_PORT_RIGHT_SEND);
- mach_port_name_t inserted_memory_object = broker.CreateIntermediateMachPort(
+ mach_port_name_t inserted_memory_object = base::CreateIntermediateMachPort(
client_task_port_.get(),
base::mac::ScopedMachSendRight(
- shared_memory->handle().GetMemoryObject()));
+ shared_memory->handle().GetMemoryObject()),
+ nullptr);
EXPECT_NE(inserted_memory_object,
static_cast<mach_port_name_t>(MACH_PORT_NULL));
SendUInt32(client_port_.get(), inserted_memory_object);
« no previous file with comments | « ipc/attachment_broker_privileged_mac.cc ('k') | ipc/attachment_broker_unprivileged_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698