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

Unified Diff: base/files/file_locking_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 | « base/debug/stack_trace_unittest.cc ('k') | base/mac/mach_port_broker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_locking_unittest.cc
diff --git a/base/files/file_locking_unittest.cc b/base/files/file_locking_unittest.cc
index b709b7536c4ad87f9bd4984a7e2d4dbe9bb338ad..0cb8d8fe5845f5bb36a63ab3354f5cca9bddd86b 100644
--- a/base/files/file_locking_unittest.cc
+++ b/base/files/file_locking_unittest.cc
@@ -152,10 +152,10 @@ class FileLockingTest : public testing::Test {
base::GetMultiProcessTestChildBaseCommandLine());
child_command_line.AppendSwitchPath(kTempDirFlag, temp_path);
child_command_line.AppendSwitch(unlock_action);
- lock_child_ =
- base::SpawnMultiProcessTestChild(ChildMainString, child_command_line,
- base::LaunchOptions());
- ASSERT_TRUE(lock_child_.IsValid());
+
+ spawn_child_ = base::SpawnMultiProcessTestChild(
+ ChildMainString, child_command_line, base::LaunchOptions());
+ ASSERT_TRUE(spawn_child_.process.IsValid());
// Wait for the child to lock the file.
ASSERT_TRUE(WaitForEventOrTimeout(kSignalLockFileLocked));
@@ -166,13 +166,13 @@ class FileLockingTest : public testing::Test {
ASSERT_TRUE(SignalEvent(kSignalExit));
int rv = -1;
ASSERT_TRUE(WaitForMultiprocessTestChildExit(
- lock_child_, TestTimeouts::action_timeout(), &rv));
+ spawn_child_.process, TestTimeouts::action_timeout(), &rv));
ASSERT_EQ(0, rv);
}
base::ScopedTempDir temp_dir_;
base::File lock_file_;
- base::Process lock_child_;
+ base::SpawnChildResult spawn_child_;
private:
DISALLOW_COPY_AND_ASSIGN(FileLockingTest);
@@ -220,7 +220,7 @@ TEST_F(FileLockingTest, UnlockOnTerminate) {
StartChildAndSignalLock(kExitUnlock);
ASSERT_NE(File::FILE_OK, lock_file_.Lock());
- ASSERT_TRUE(TerminateMultiProcessTestChild(lock_child_, 0, true));
+ ASSERT_TRUE(TerminateMultiProcessTestChild(spawn_child_.process, 0, true));
ASSERT_EQ(File::FILE_OK, lock_file_.Lock());
ASSERT_EQ(File::FILE_OK, lock_file_.Unlock());
}
« no previous file with comments | « base/debug/stack_trace_unittest.cc ('k') | base/mac/mach_port_broker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698