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

Unified Diff: chrome/common/service_process_util_unittest.cc

Issue 2733323002: Changing multiprocess test SpawnChild to return a struct. (Closed)
Patch Set: Synced Created 3 years, 9 months 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/common/multi_process_lock_unittest.cc ('k') | chrome/installer/setup/setup_singleton_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/service_process_util_unittest.cc
diff --git a/chrome/common/service_process_util_unittest.cc b/chrome/common/service_process_util_unittest.cc
index 41a0c0e39a15030e0b9479166b906379195320d6..e761c3a7461854696bc711354be09970d420be9d 100644
--- a/chrome/common/service_process_util_unittest.cc
+++ b/chrome/common/service_process_util_unittest.cc
@@ -101,10 +101,10 @@ void ServiceProcessStateTest::SetUp() {
}
void ServiceProcessStateTest::LaunchAndWait(const std::string& name) {
- base::Process process = SpawnChild(name);
- ASSERT_TRUE(process.IsValid());
+ base::SpawnChildResult spawn_child = SpawnChild(name);
+ ASSERT_TRUE(spawn_child.process.IsValid());
int exit_code = 0;
- ASSERT_TRUE(process.WaitForExit(&exit_code));
+ ASSERT_TRUE(spawn_child.process.WaitForExit(&exit_code));
ASSERT_EQ(exit_code, 0);
}
@@ -195,8 +195,9 @@ TEST_F(ServiceProcessStateTest, DISABLED_SharedMem) {
}
TEST_F(ServiceProcessStateTest, MAYBE_ForceShutdown) {
- base::Process process = SpawnChild("ServiceProcessStateTestShutdown");
- ASSERT_TRUE(process.IsValid());
+ base::SpawnChildResult spawn_child =
+ SpawnChild("ServiceProcessStateTestShutdown");
+ ASSERT_TRUE(spawn_child.process.IsValid());
for (int i = 0; !CheckServiceProcessReady() && i < 10; ++i) {
base::PlatformThread::Sleep(TestTimeouts::tiny_timeout());
}
@@ -206,8 +207,8 @@ TEST_F(ServiceProcessStateTest, MAYBE_ForceShutdown) {
ASSERT_TRUE(GetServiceProcessData(&version, &pid));
ASSERT_TRUE(ForceServiceProcessShutdown(version, pid));
int exit_code = 0;
- ASSERT_TRUE(process.WaitForExitWithTimeout(TestTimeouts::action_max_timeout(),
- &exit_code));
+ ASSERT_TRUE(spawn_child.process.WaitForExitWithTimeout(
+ TestTimeouts::action_max_timeout(), &exit_code));
ASSERT_EQ(exit_code, 0);
}
« no previous file with comments | « chrome/common/multi_process_lock_unittest.cc ('k') | chrome/installer/setup/setup_singleton_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698