diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-08 14:40:25 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-08 14:40:25 +0000 |
commit | df14e42534f154e4d511936236779e4793e3b5d3 (patch) | |
tree | 7ab406d195080fcbda95e0360ba28120894c9637 /ui/test/test_suite.cc | |
parent | 3e9b586686f3055326c654959012550f9f81e960 (diff) | |
download | chromium_src-df14e42534f154e4d511936236779e4793e3b5d3.zip chromium_src-df14e42534f154e4d511936236779e4793e3b5d3.tar.gz chromium_src-df14e42534f154e4d511936236779e4793e3b5d3.tar.bz2 |
ui: Remove unnecessary pak file loading in UITestSuite.
We already load chrome.pak and en-US.pak which includes all the necessary
strings and images for the tests.
This also fixes the following errors I'm seeing in ui_unittests target.
[18617:18617:0104/164229:7580537011:ERROR:memory_mapped_file.cc(23)] Couldn't open /home/tfarina/chromium/src/out_cros/Debug/ui_unittests_strings/chrome_100_percent.pak
[18617:18617:0104/164229:7580537130:ERROR:data_pack.cc(78)] Failed to mmap datapack
[18617:18617:0104/164229:7580537189:ERROR:resource_bundle.cc(607)] Failed to load /home/tfarina/chromium/src/out_cros/Debug/ui_unittests_strings/chrome_100_percent.pak
Some features may not be available.
BUG=144345
TEST=ui_unittests, app_list_unittests, message_center_unittests
R=tony@chromium.org
TBR=ben
Review URL: https://codereview.chromium.org/104783007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243557 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/test/test_suite.cc')
-rw-r--r-- | ui/test/test_suite.cc | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/ui/test/test_suite.cc b/ui/test/test_suite.cc index 1ba954d..c744d6e 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() { |