From 6bfa2520a5a94d9ec23c68957ea8583557f0f411 Mon Sep 17 00:00:00 2001 From: rvargas Date: Tue, 9 Dec 2014 18:09:53 -0800 Subject: [PATCH] Update apps/ to use the new version of LaunchProcess. BUG=417532 Review URL: https://codereview.chromium.org/788953002 Cr-Commit-Position: refs/heads/master@{#307617} --- apps/load_and_launch_browsertest.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/load_and_launch_browsertest.cc b/apps/load_and_launch_browsertest.cc index 92e95763b59b31..6624de9bb76f44 100644 --- a/apps/load_and_launch_browsertest.cc +++ b/apps/load_and_launch_browsertest.cc @@ -50,13 +50,13 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, app_path.value()); new_cmdline.AppendSwitch(content::kLaunchAsBrowser); - base::ProcessHandle process; - base::LaunchProcess(new_cmdline, base::LaunchOptionsForTest(), &process); - ASSERT_NE(base::kNullProcessHandle, process); + base::Process process = + base::LaunchProcess(new_cmdline, base::LaunchOptionsForTest()); + ASSERT_TRUE(process.IsValid()); ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); - ASSERT_TRUE(base::WaitForSingleProcess( - process, TestTimeouts::action_timeout())); + ASSERT_TRUE(base::WaitForSingleProcess(process.Handle(), + TestTimeouts::action_timeout())); } // TODO(jackhou): Enable this test once it works on OSX. It currently does not @@ -93,13 +93,13 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, new_cmdline.AppendSwitch(content::kLaunchAsBrowser); new_cmdline.AppendArgPath(test_file_path); - base::ProcessHandle process; - base::LaunchProcess(new_cmdline, base::LaunchOptionsForTest(), &process); - ASSERT_NE(base::kNullProcessHandle, process); + base::Process process = + base::LaunchProcess(new_cmdline, base::LaunchOptionsForTest()); + ASSERT_TRUE(process.IsValid()); ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); - ASSERT_TRUE(base::WaitForSingleProcess( - process, TestTimeouts::action_timeout())); + ASSERT_TRUE(base::WaitForSingleProcess(process.Handle(), + TestTimeouts::action_timeout())); } namespace {