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

Unified Diff: chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc

Issue 785353003: Update cloud_print and chrome/service to use the new version of LaunchProcess. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | chrome/service/cloud_print/cloud_print_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc
diff --git a/chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc b/chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc
index dc29c06449fdc8b31f148ab103bcc9047d20112a..5b8087d7f80d598dab72e29cfe36fe61b1514cfa 100644
--- a/chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc
+++ b/chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc
@@ -44,22 +44,17 @@ IN_PROC_BROWSER_TEST_F(CloudPrintPolicyTest, NormalPassedFlag) {
chrome::NOTIFICATION_TAB_ADDED,
content::NotificationService::AllSources());
- base::ProcessHandle handle;
- bool launched =
- base::LaunchProcess(new_command_line, base::LaunchOptionsForTest(),
- &handle);
- EXPECT_TRUE(launched);
+ base::Process process =
+ base::LaunchProcess(new_command_line, base::LaunchOptionsForTest());
+ EXPECT_TRUE(process.IsValid());
observer.Wait();
int exit_code = -100;
- bool exited =
- base::WaitForExitCodeWithTimeout(handle, &exit_code,
- TestTimeouts::action_timeout());
-
+ bool exited = process.WaitForExitWithTimeout(TestTimeouts::action_timeout(),
+ &exit_code);
EXPECT_TRUE(exited);
EXPECT_EQ(chrome::RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED, exit_code);
- base::CloseProcessHandle(handle);
}
// Disabled due to http://crbug.com/144393.
@@ -74,20 +69,15 @@ IN_PROC_BROWSER_TEST_F(CloudPrintPolicyTest, DISABLED_CloudPrintPolicyFlag) {
switches::kSpeculativeResourcePrefetching,
switches::kSpeculativeResourcePrefetchingDisabled);
- base::ProcessHandle handle;
- bool launched =
- base::LaunchProcess(new_command_line, base::LaunchOptionsForTest(),
- &handle);
- EXPECT_TRUE(launched);
+ base::Process process =
+ base::LaunchProcess(new_command_line, base::LaunchOptionsForTest());
+ EXPECT_TRUE(process.IsValid());
int exit_code = -100;
- bool exited =
- base::WaitForExitCodeWithTimeout(handle, &exit_code,
- TestTimeouts::action_timeout());
-
+ bool exited = process.WaitForExitWithTimeout(TestTimeouts::action_timeout(),
+ &exit_code);
EXPECT_TRUE(exited);
EXPECT_EQ(content::RESULT_CODE_NORMAL_EXIT, exit_code);
- base::CloseProcessHandle(handle);
}
} // namespace
« no previous file with comments | « no previous file | chrome/service/cloud_print/cloud_print_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698