Commit 830c1660 authored by Nicolas Ouellet-payeur's avatar Nicolas Ouellet-payeur Committed by Commit Bot

Update SetProcessBackgrounded() test on Linux

The test was missing EXPECT_*() statements on other platforms than Mac/Windows.

Bug: 816389
Change-Id: Ib50b315445e810025f403faaad7bd1f288369b7f
Reviewed-on: https://chromium-review.googlesource.com/1145623Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577175}
parent 038bf28a
......@@ -231,12 +231,7 @@ TEST_F(ProcessTest, SetProcessBackgrounded) {
return;
Process process(SpawnChild("SimpleChildProcess"));
int old_priority = process.GetPriority();
#if defined(OS_WIN)
EXPECT_TRUE(process.SetProcessBackgrounded(true));
EXPECT_TRUE(process.IsProcessBackgrounded());
EXPECT_TRUE(process.SetProcessBackgrounded(false));
EXPECT_FALSE(process.IsProcessBackgrounded());
#elif defined(OS_MACOSX)
#if defined(OS_MACOSX)
// On the Mac, backgrounding a process requires a port to that process.
// In the browser it's available through the MachBroker class, which is not
// part of base. Additionally, there is an indefinite amount of time between
......@@ -250,8 +245,10 @@ TEST_F(ProcessTest, SetProcessBackgrounded) {
EXPECT_FALSE(process.IsProcessBackgrounded(&provider));
#else
process.SetProcessBackgrounded(true);
process.SetProcessBackgrounded(false);
EXPECT_TRUE(process.SetProcessBackgrounded(true));
EXPECT_TRUE(process.IsProcessBackgrounded());
EXPECT_TRUE(process.SetProcessBackgrounded(false));
EXPECT_FALSE(process.IsProcessBackgrounded());
#endif
int new_priority = process.GetPriority();
EXPECT_EQ(old_priority, new_priority);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment