Index: content/browser/mach_broker_mac_unittest.cc |
diff --git a/content/browser/mach_broker_mac_unittest.cc b/content/browser/mach_broker_mac_unittest.cc |
index 7bd88a550cffad1d28f3b5c86bd59d2a864e73fe..a7eca4fd2f4ff770d181bfec2598d224d42dc7af 100644 |
--- a/content/browser/mach_broker_mac_unittest.cc |
+++ b/content/browser/mach_broker_mac_unittest.cc |
@@ -17,11 +17,15 @@ class MachBrokerTest : public testing::Test { |
broker_.AddPlaceholderForPid(pid); |
} |
+ void InvalidatePid(base::ProcessHandle pid) { |
+ broker_.InvalidatePid(pid); |
+ } |
+ |
// Helper function to acquire/release locks and call |FinalizePid()|. |
void FinalizePid(base::ProcessHandle pid, |
- const MachBroker::MachInfo& mach_info) { |
+ mach_port_t task_port) { |
base::AutoLock lock(broker_.GetLock()); |
- broker_.FinalizePid(pid, mach_info); |
+ broker_.FinalizePid(pid, task_port); |
} |
protected: |
@@ -39,7 +43,7 @@ TEST_F(MachBrokerTest, AddPlaceholderAndFinalize) { |
EXPECT_EQ(0u, broker_.TaskForPid(1)); |
// Finalize PID 1. |
- FinalizePid(1, MachBroker::MachInfo().SetTask(100u)); |
+ FinalizePid(1, 100u); |
EXPECT_EQ(100u, broker_.TaskForPid(1)); |
// Should be no entry for PID 2. |
@@ -48,16 +52,16 @@ TEST_F(MachBrokerTest, AddPlaceholderAndFinalize) { |
TEST_F(MachBrokerTest, Invalidate) { |
AddPlaceholderForPid(1); |
- FinalizePid(1, MachBroker::MachInfo().SetTask(100u)); |
+ FinalizePid(1, 100u); |
EXPECT_EQ(100u, broker_.TaskForPid(1)); |
- broker_.InvalidatePid(1u); |
+ InvalidatePid(1u); |
EXPECT_EQ(0u, broker_.TaskForPid(1)); |
} |
TEST_F(MachBrokerTest, FinalizeUnknownPid) { |
// Finalizing an entry for an unknown pid should not add it to the map. |
- FinalizePid(1u, MachBroker::MachInfo().SetTask(100u)); |
+ FinalizePid(1u, 100u); |
EXPECT_EQ(0u, broker_.TaskForPid(1u)); |
} |