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

Unified Diff: components/test/run_all_unittests.cc

Issue 258043003: Eliminate components_unittests' dependence on chrome resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore ui path provider Created 6 years, 7 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
« no previous file with comments | « components/components_unittests.isolate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test/run_all_unittests.cc
diff --git a/components/test/run_all_unittests.cc b/components/test/run_all_unittests.cc
index 0e6dafa6027e48cac821939a3a6b511ac426aa41..d172c909151133396dbdd1104f1b0e5ffa9a63ec 100644
--- a/components/test/run_all_unittests.cc
+++ b/components/test/run_all_unittests.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/bind.h"
+#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/test/launcher/unit_test_launcher.h"
@@ -12,10 +13,6 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
-#if defined(OS_MACOSX)
-#include "base/mac/bundle_locations.h"
-#endif
-
#if !defined(OS_IOS)
#include "ui/gl/gl_surface.h"
#endif
@@ -45,45 +42,17 @@ 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);
-
- // TODO(tfarina): This is temporary. The right fix is to write a
- // framework-Info.plist and integrate that into the build.
- // Hardcode the framework name here to avoid having to depend on chrome's
- // common target for chrome::kFrameworkName.
-#if defined(GOOGLE_CHROME_BUILD)
- path = path.AppendASCII("Google Chrome Framework.framework");
-#elif defined(CHROMIUM_BUILD)
- path = path.AppendASCII("Chromium Framework.framework");
-#else
-#error Unknown branding
-#endif
-
- base::mac::SetOverrideFrameworkBundlePath(path);
-#endif
-
ui::RegisterPathProvider();
tfarina 2014/05/07 20:58:40 Yaron, there is no components_paths.cc:RegisterPat
- // TODO(tfarina): This should be changed to InitSharedInstanceWithPakFile()
- // so we can load our pak file instead of chrome.pak. crbug.com/348563
- ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
base::FilePath resources_pack_path;
PathService::Get(base::DIR_MODULE, &resources_pack_path);
- ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
- resources_pack_path.AppendASCII("resources.pak"),
- ui::SCALE_FACTOR_NONE);
+ ui::ResourceBundle::InitSharedInstanceWithPakPath(
+ resources_pack_path.AppendASCII("components_unittests_resources.pak"));
}
virtual void Shutdown() OVERRIDE {
ui::ResourceBundle::CleanupSharedInstance();
-#if defined(OS_MACOSX) && !defined(OS_IOS)
- base::mac::SetOverrideFrameworkBundle(NULL);
-#endif
-
base::TestSuite::Shutdown();
}
« no previous file with comments | « components/components_unittests.isolate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698