Index: chrome/browser/process_info_snapshot_mac_unittest.cc |
=================================================================== |
--- chrome/browser/process_info_snapshot_mac_unittest.cc (revision 70404) |
+++ chrome/browser/process_info_snapshot_mac_unittest.cc (working copy) |
@@ -77,6 +77,8 @@ |
// should occupy at least 100 kilobytes. |
EXPECT_GE(proc_info.vsize, 1024u); // Sanity check: our |vsize| is presumably |
// at least a megabyte. |
+ EXPECT_GE(proc_info.rshrd, 1024u); // Shared memory should also > 1 MB. |
+ EXPECT_GE(proc_info.rprvt, 1024u); // Same with private memory. |
// Find our parent. |
ASSERT_TRUE(snapshot.GetProcInfo(ppid, &proc_info)); |
@@ -87,24 +89,3 @@ |
// Can't say anything definite about its |rss|. |
EXPECT_GT(proc_info.vsize, 0u); // Its |vsize| should be nonzero though. |
} |
- |
-TEST_F(ProcessInfoSnapshotMacTest, EffectiveVsRealUserIDTest) { |
- // Run top which has a uid of the caller and effective uid of 0. |
- base::ProcessHandle process_handle; |
- ASSERT_TRUE(base::LaunchApp(CommandLine(FilePath("/usr/bin/top")), |
- false, false, &process_handle)); |
- |
- std::vector<base::ProcessId> pid_list; |
- pid_list.push_back(process_handle); |
- ProcessInfoSnapshot snapshot; |
- ASSERT_TRUE(snapshot.Sample(pid_list)); |
- |
- ProcessInfoSnapshot::ProcInfoEntry proc_info; |
- ASSERT_TRUE(snapshot.GetProcInfo(process_handle, &proc_info)); |
- // Effective user ID should be 0 (root). |
- EXPECT_EQ(proc_info.euid, 0u); |
- // Real user ID should match the calling process's user id. |
- EXPECT_EQ(proc_info.uid, geteuid()); |
- |
- ASSERT_TRUE(base::KillProcess(process_handle, 0, true)); |
-} |