Commit f5766594 authored by Robert Sesek's avatar Robert Sesek Committed by Commit Bot

Fix class ServiceProcessControlBrowserTest with new_mac_bundle_structure.

The test hard-codes a path to the Helper app, which needs to be updated.

Tbr: avi@chromium.org
Bug: 958976,964767
Change-Id: Iebf6fb71841fd9b03d226f8047128a683058bb62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1618273
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Auto-Submit: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661230}
parent 1390f8a0
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/cloud_print.mojom.h" #include "chrome/common/cloud_print.mojom.h"
#include "chrome/common/service_process_util.h" #include "chrome/common/service_process_util.h"
#include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/in_process_browser_test.h"
...@@ -90,12 +91,24 @@ class ServiceProcessControlBrowserTest ...@@ -90,12 +91,24 @@ class ServiceProcessControlBrowserTest
// point to a bundle so that the service process has an Info.plist. // point to a bundle so that the service process has an Info.plist.
base::FilePath exe_path; base::FilePath exe_path;
ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &exe_path)); ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &exe_path));
#if BUILDFLAG(NEW_MAC_BUNDLE_STRUCTURE)
exe_path = exe_path.DirName() exe_path = exe_path.DirName()
.DirName() .DirName()
.Append("Contents") .Append("Contents")
.Append("Frameworks")
.Append(chrome::kFrameworkName)
.Append("Versions") .Append("Versions")
.Append(chrome::kChromeVersion) .Append(chrome::kChromeVersion)
.Append("Helpers")
.Append(chrome::kHelperProcessExecutablePath); .Append(chrome::kHelperProcessExecutablePath);
#else
exe_path = exe_path.DirName()
.DirName()
.Append("Contents")
.Append("Versions")
.Append(chrome::kChromeVersion)
.Append(chrome::kHelperProcessExecutablePath);
#endif
child_process_exe_override_ = std::make_unique<base::ScopedPathOverride>( child_process_exe_override_ = std::make_unique<base::ScopedPathOverride>(
content::CHILD_PROCESS_EXE, exe_path); content::CHILD_PROCESS_EXE, exe_path);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment