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

Unified Diff: chrome/browser/process_singleton_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
Index: chrome/browser/process_singleton_win_unittest.cc
diff --git a/chrome/browser/process_singleton_win_unittest.cc b/chrome/browser/process_singleton_win_unittest.cc
index df53228df8a9d58e9d231b18892bc88d38fafcb7..39225ffb0c2cf5783b2121562b6cbd5ecb049c5d 100644
--- a/chrome/browser/process_singleton_win_unittest.cc
+++ b/chrome/browser/process_singleton_win_unittest.cc
@@ -161,9 +161,9 @@ class ProcessSingletonTest : public base::MultiProcessTest {
void TearDown() override {
chrome::SetNotificationTimeoutForTesting(old_notification_timeout_);
- if (browser_victim_.IsValid()) {
+ if (browser_victim_.process.IsValid()) {
EXPECT_TRUE(::SetEvent(continue_event_.Get()));
- EXPECT_TRUE(browser_victim_.WaitForExit(nullptr));
+ EXPECT_TRUE(browser_victim_.process.WaitForExit(nullptr));
}
base::MultiProcessTest::TearDown();
@@ -195,7 +195,7 @@ class ProcessSingletonTest : public base::MultiProcessTest {
SpawnChildWithOptions("ProcessSingletonTestProcessMain", options);
// Wait for the ready event (or process exit).
- HANDLE handles[] = {ready_event.Get(), browser_victim_.Handle()};
+ HANDLE handles[] = {ready_event.Get(), browser_victim_.process.Handle()};
// The wait should always return because either |ready_event| is signaled or
// |browser_victim_| died unexpectedly or exited on error.
DWORD result =
@@ -228,7 +228,7 @@ class ProcessSingletonTest : public base::MultiProcessTest {
base::Unretained(this), allow_kill));
}
- base::Process* browser_victim() { return &browser_victim_; }
+ base::Process* browser_victim() { return &(browser_victim_.process); }
const base::FilePath& user_data_dir() const {
return user_data_dir_.GetPath();
}
@@ -246,7 +246,7 @@ class ProcessSingletonTest : public base::MultiProcessTest {
WindowOption window_option_;
base::ScopedTempDir user_data_dir_;
- base::Process browser_victim_;
+ base::SpawnChildResult browser_victim_;
base::win::ScopedHandle continue_event_;
std::unique_ptr<ProcessSingleton> test_singleton_;

Powered by Google App Engine
This is Rietveld 408576698