diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-29 01:22:31 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-29 01:22:31 +0000 |
commit | 235ef1a1b146d4fb28d80cfc822f9778d121743a (patch) | |
tree | d90481807f2a177f2727c9aa1656f5782495fc4c /base | |
parent | 6880e73da009a1da35dbb1f4b5230486f4248584 (diff) | |
download | chromium_src-235ef1a1b146d4fb28d80cfc822f9778d121743a.zip chromium_src-235ef1a1b146d4fb28d80cfc822f9778d121743a.tar.gz chromium_src-235ef1a1b146d4fb28d80cfc822f9778d121743a.tar.bz2 |
Fix one more time the linux tests, in other words giving up on improving the tests
TBR=brettw
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83469 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/process_util_unittest.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc index 1367fa2..02d02ac 100644 --- a/base/process_util_unittest.cc +++ b/base/process_util_unittest.cc @@ -260,13 +260,15 @@ TEST_F(ProcessUtilTest, SetProcessBackgrounded) { base::ProcessHandle handle = this->SpawnChild("SimpleChildProcess", false); base::Process process(handle); int old_priority = process.GetPriority(); - if (process.SetProcessBackgrounded(true)) { #if defined(OS_WIN) - EXPECT_TRUE(process.IsProcessBackgrounded()); + EXPECT_TRUE(process.SetProcessBackgrounded(true)); + EXPECT_TRUE(process.IsProcessBackgrounded()); + EXPECT_TRUE(process.SetProcessBackgrounded(false)); + EXPECT_FALSE(process.IsProcessBackgrounded()); +#else + process.SetProcessBackgrounded(true); + process.SetProcessBackgrounded(false); #endif - EXPECT_TRUE(process.SetProcessBackgrounded(false)); - EXPECT_FALSE(process.IsProcessBackgrounded()); - } int new_priority = process.GetPriority(); EXPECT_EQ(old_priority, new_priority); } @@ -276,13 +278,15 @@ TEST_F(ProcessUtilTest, SetProcessBackgrounded) { TEST_F(ProcessUtilTest, SetProcessBackgroundedSelf) { base::Process process(base::Process::Current().handle()); int old_priority = process.GetPriority(); - if (process.SetProcessBackgrounded(true)) { #if defined(OS_WIN) - EXPECT_TRUE(process.IsProcessBackgrounded()); + EXPECT_TRUE(process.SetProcessBackgrounded(true)); + EXPECT_TRUE(process.IsProcessBackgrounded()); + EXPECT_TRUE(process.SetProcessBackgrounded(false)); + EXPECT_FALSE(process.IsProcessBackgrounded()); +#else + process.SetProcessBackgrounded(true); + process.SetProcessBackgrounded(false); #endif - EXPECT_TRUE(process.SetProcessBackgrounded(false)); - EXPECT_FALSE(process.IsProcessBackgrounded()); - } int new_priority = process.GetPriority(); EXPECT_EQ(old_priority, new_priority); } |