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

Unified Diff: chrome/browser/process_info_snapshot_mac_unittest.cc

Issue 1548133002: Switch to standard integer types in chrome/browser/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « chrome/browser/process_info_snapshot_mac.cc ('k') | chrome/browser/process_resource_usage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/process_info_snapshot_mac_unittest.cc
diff --git a/chrome/browser/process_info_snapshot_mac_unittest.cc b/chrome/browser/process_info_snapshot_mac_unittest.cc
index e95cf0c91b28107f4f455861e59d33ef2cf44b79..25e084b83dc9305604486bbb5228d1a75ec2504b 100644
--- a/chrome/browser/process_info_snapshot_mac_unittest.cc
+++ b/chrome/browser/process_info_snapshot_mac_unittest.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/process_info_snapshot.h"
+#include <stdint.h>
#include <sys/types.h> // For |uid_t| (and |pid_t|).
#include <unistd.h> // For |getpid()|, |getuid()|, etc.
@@ -31,10 +32,10 @@ TEST_F(ProcessInfoSnapshotMacTest, FindPidOneTest) {
ProcessInfoSnapshot::ProcInfoEntry proc_info;
ASSERT_TRUE(snapshot.GetProcInfo(1, &proc_info));
- EXPECT_EQ(1, static_cast<int64>(proc_info.pid));
- EXPECT_EQ(0, static_cast<int64>(proc_info.ppid));
- EXPECT_EQ(0, static_cast<int64>(proc_info.uid));
- EXPECT_EQ(0, static_cast<int64>(proc_info.euid));
+ EXPECT_EQ(1, static_cast<int64_t>(proc_info.pid));
+ EXPECT_EQ(0, static_cast<int64_t>(proc_info.ppid));
+ EXPECT_EQ(0, static_cast<int64_t>(proc_info.uid));
+ EXPECT_EQ(0, static_cast<int64_t>(proc_info.euid));
EXPECT_GE(proc_info.rss, 0u);
EXPECT_GT(proc_info.vsize, 0u);
@@ -62,7 +63,7 @@ TEST_F(ProcessInfoSnapshotMacTest, FindPidSelfTest) {
base::ProcessId ppid = static_cast<base::ProcessId>(getppid());
uid_t uid = getuid();
uid_t euid = geteuid();
- EXPECT_NE(static_cast<int64>(ppid), 0);
+ EXPECT_NE(static_cast<int64_t>(ppid), 0);
std::vector<base::ProcessId> pid_list;
pid_list.push_back(pid);
@@ -94,7 +95,7 @@ TEST_F(ProcessInfoSnapshotMacTest, FindPidSelfTest) {
// Find our parent.
ASSERT_TRUE(snapshot.GetProcInfo(ppid, &proc_info));
EXPECT_EQ(ppid, proc_info.pid);
- EXPECT_NE(static_cast<int64>(proc_info.ppid), 0);
+ EXPECT_NE(static_cast<int64_t>(proc_info.ppid), 0);
EXPECT_EQ(uid, proc_info.uid); // This (and the following) should be true
EXPECT_EQ(euid, proc_info.euid); // under reasonable circumstances.
// Can't say anything definite about its |rss|.
« no previous file with comments | « chrome/browser/process_info_snapshot_mac.cc ('k') | chrome/browser/process_resource_usage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698