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

Unified Diff: base/process/process_unittest.cc

Issue 1474483002: Fix split in base::ProcessIsProcessBackgrounded() (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Added tests Created 5 years, 1 month 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 | « base/process/process_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_unittest.cc
diff --git a/base/process/process_unittest.cc b/base/process/process_unittest.cc
index 914a8edc56b87b8506a35fb8142ecedfc8d5c818..6ff5e7fed47adc7bdf55692b94725fef8bf8be13 100644
--- a/base/process/process_unittest.cc
+++ b/base/process/process_unittest.cc
@@ -208,10 +208,10 @@ TEST_F(ProcessTest, SetProcessBackgroundedSelf) {
// Tests that the function IsProcessBackgroundedCGroup() can parse the contents
// of the /proc/<pid>/cgroup file successfully.
TEST_F(ProcessTest, TestIsProcessBackgroundedCGroup) {
- const char kNotBackgrounded[] = "5:cpuacct,cpu,cpuset:/daemons";
+ const char kNotBackgrounded[] = "5:cpuacct,cpu,cpuset:/daemons\n";
const char kBackgrounded[] =
"2:freezer:/chrome_renderers/to_be_frozen\n"
- "1:cpu:/chrome_renderers/background";
+ "1:cpu:/chrome_renderers/background\n";
EXPECT_FALSE(IsProcessBackgroundedCGroup(kNotBackgrounded));
EXPECT_TRUE(IsProcessBackgroundedCGroup(kBackgrounded));
« no previous file with comments | « base/process/process_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698