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

Unified Diff: ui/test/test_suite.cc

Issue 104783007: ui: Clean up UITestSuite initialization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add packed_resources to run_ui_unittests instead Created 6 years, 11 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 | « no previous file | ui/ui_unittests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/test/test_suite.cc
diff --git a/ui/test/test_suite.cc b/ui/test/test_suite.cc
index 1ba954d6fd481f8446a531974ac3c87be616a298..c744d6ed43b3ed69a34fda14a2d0062ab6cc7442 100644
--- a/ui/test/test_suite.cc
+++ b/ui/test/test_suite.cc
@@ -8,7 +8,6 @@
#include "base/path_service.h"
#include "build/build_config.h"
#include "ui/base/resource/resource_bundle.h"
-#include "ui/base/resource/resource_handle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/gfx/gfx_paths.h"
@@ -54,26 +53,12 @@ void UITestSuite::Initialize() {
#error Unknown branding
#endif
base::mac::SetOverrideFrameworkBundlePath(path);
-#elif defined(OS_POSIX)
- base::FilePath pak_dir;
-#if defined(OS_ANDROID)
- PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &pak_dir);
-#else
- PathService::Get(base::DIR_MODULE, &pak_dir);
- pak_dir = pak_dir.AppendASCII("ui_unittests_strings");
- PathService::Override(ui::DIR_LOCALES, pak_dir);
-#endif // defined(OS_ANDROID)
#endif // defined(OS_MACOSX) && !defined(OS_IOS)
- // Force unittests to run using en-US so if we test against string
- // output, it'll pass regardless of the system language.
+ // TODO(tfarina): This loads chrome_100_percent.pak and thus introduces a
+ // dependency on chrome/, we don't want that here, so change this to
+ // InitSharedInstanceWithPakPath().
ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
-
-#if !defined(OS_MACOSX) && defined(OS_POSIX)
- ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
- pak_dir.AppendASCII("chrome_100_percent.pak"),
- ui::SCALE_FACTOR_100P);
-#endif
}
void UITestSuite::Shutdown() {
« no previous file with comments | « no previous file | ui/ui_unittests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698