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

Unified Diff: content/browser/mach_broker_mac_unittest.cc

Issue 13845008: [Mac] Remove base::LaunchSynchronize and rewrite content::MachBroker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix link_settings Created 7 years, 8 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 | « content/browser/mach_broker_mac.mm ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « content/browser/mach_broker_mac.mm ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698