| Index: components/test/run_all_unittests.cc
|
| diff --git a/components/test/run_all_unittests.cc b/components/test/run_all_unittests.cc
|
| index b59285f597fd488200c4dab4e10468d84d4c4e59..3c696ff83acb194f69a81a68d4d4829e65e7783e 100644
|
| --- a/components/test/run_all_unittests.cc
|
| +++ b/components/test/run_all_unittests.cc
|
| @@ -4,18 +4,29 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/path_service.h"
|
| #include "base/test/launcher/unit_test_launcher.h"
|
| #include "base/test/test_suite.h"
|
| +#include "chrome/common/chrome_constants.h"
|
| +#include "chrome/common/chrome_paths.h"
|
| #include "content/public/test/test_content_client_initializer.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
|
|
| +#if defined(OS_MACOSX)
|
| +#include "base/mac/bundle_locations.h"
|
| +#endif
|
| +
|
| #if defined(OS_ANDROID)
|
| #include "base/android/jni_android.h"
|
| #include "ui/base/android/ui_base_jni_registrar.h"
|
| #include "ui/gfx/android/gfx_jni_registrar.h"
|
| #endif
|
|
|
| +#if defined(OS_CHROMEOS)
|
| +#include "chromeos/chromeos_paths.h"
|
| +#endif
|
| +
|
| namespace {
|
|
|
| class ComponentsTestSuite : public base::TestSuite {
|
| @@ -33,9 +44,27 @@ class ComponentsTestSuite : public base::TestSuite {
|
| ui::android::RegisterJni(env);
|
| #endif
|
|
|
| +#if defined(OS_MACOSX) && !defined(OS_IOS)
|
| + // Look in the framework bundle for resources.
|
| + base::FilePath path;
|
| + PathService::Get(base::DIR_EXE, &path);
|
| + path = path.Append(chrome::kFrameworkName);
|
| + base::mac::SetOverrideFrameworkBundlePath(path);
|
| +#endif
|
| +
|
| + chrome::RegisterPathProvider();
|
| +#if defined(OS_CHROMEOS)
|
| + chromeos::RegisterPathProvider();
|
| +#endif
|
| // TODO(tfarina): This should be changed to InitSharedInstanceWithPakFile()
|
| // so we can load our pak file instead of chrome.pak.
|
| ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
|
| + base::FilePath resources_pack_path;
|
| + PathService::Get(base::DIR_MODULE, &resources_pack_path);
|
| + resources_pack_path =
|
| + resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak"));
|
| + ResourceBundle::GetSharedInstance().AddDataPackFromPath(
|
| + resources_pack_path, ui::SCALE_FACTOR_NONE);
|
| }
|
|
|
| virtual void Shutdown() OVERRIDE {
|
|
|