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

Unified Diff: base/memory/shared_memory_win_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/memory/shared_memory_unittest.cc ('k') | base/process/process_metrics_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_win_unittest.cc
diff --git a/base/memory/shared_memory_win_unittest.cc b/base/memory/shared_memory_win_unittest.cc
index 5fc132d25a1fbed6d02574402d69c517ba4eb9e0..d04e840236f8e776fa175c165ac8c7c018bba753 100644
--- a/base/memory/shared_memory_win_unittest.cc
+++ b/base/memory/shared_memory_win_unittest.cc
@@ -199,8 +199,10 @@ TEST_F(SharedMemoryWinTest, LowerPermissions) {
base::LaunchOptions options;
options.as_user = lowered_process_token.Get();
- base::Process process = SpawnChildWithOptions("LowerPermissions", options);
- ASSERT_TRUE(process.IsValid());
+
+ base::SpawnChildResult spawn_child =
+ SpawnChildWithOptions("LowerPermissions", options);
+ ASSERT_TRUE(spawn_child.process.IsValid());
SharedMemory memory;
memory.CreateAndMapAnonymous(1001);
@@ -208,15 +210,15 @@ TEST_F(SharedMemoryWinTest, LowerPermissions) {
// Duplicate into child process, giving only FILE_MAP_READ permissions.
HANDLE raw_handle = nullptr;
::DuplicateHandle(::GetCurrentProcess(), memory.handle().GetHandle(),
- process.Handle(), &raw_handle,
+ spawn_child.process.Handle(), &raw_handle,
FILE_MAP_READ | SECTION_QUERY, FALSE, 0);
ASSERT_TRUE(raw_handle);
WriteHandleToPipe(communication_pipe.Get(), raw_handle);
int exit_code;
- EXPECT_TRUE(process.WaitForExitWithTimeout(TestTimeouts::action_max_timeout(),
- &exit_code));
+ EXPECT_TRUE(spawn_child.process.WaitForExitWithTimeout(
+ TestTimeouts::action_max_timeout(), &exit_code));
EXPECT_EQ(0, exit_code);
}
« no previous file with comments | « base/memory/shared_memory_unittest.cc ('k') | base/process/process_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698