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

Unified Diff: ash/test/test_suite.cc

Issue 2148363003: mash: Cleanup ash test strings and resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup patch Created 4 years, 5 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 | « ash/sysui/sysui_application.cc ('k') | mash/test/mash_test_suite.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/test_suite.cc
diff --git a/ash/test/test_suite.cc b/ash/test/test_suite.cc
index 414619b2b7ed8701cb4d4fb41815ee0a02b3ed4c..eb28d27c0eafbfe9185a2c24def12972e519a585 100644
--- a/ash/test/test_suite.cc
+++ b/ash/test/test_suite.cc
@@ -53,8 +53,7 @@ void AuraShellTestSuite::Initialize() {
// it'll pass regardless of the system language.
base::i18n::SetICUDefaultLocale("en_US");
- // Load ash resources and en-US strings; not 'common' (Chrome) resources.
- // TODO(msw): Check ResourceBundle::IsScaleFactorSupported; load 300% etc.
+ // Load ash test resources and en-US strings; not 'common' (Chrome) resources.
base::FilePath path;
PathService::Get(base::DIR_MODULE, &path);
base::FilePath ash_test_strings =
@@ -66,8 +65,10 @@ void AuraShellTestSuite::Initialize() {
ui::ResourceBundle::InitSharedInstanceWithPakPath(ash_test_strings);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- rb.AddDataPackFromPath(ash_test_resources_100, ui::SCALE_FACTOR_100P);
- rb.AddDataPackFromPath(ash_test_resources_200, ui::SCALE_FACTOR_200P);
+ if (ui::ResourceBundle::IsScaleFactorSupported(ui::SCALE_FACTOR_100P))
+ rb.AddDataPackFromPath(ash_test_resources_100, ui::SCALE_FACTOR_100P);
+ if (ui::ResourceBundle::IsScaleFactorSupported(ui::SCALE_FACTOR_200P))
+ rb.AddDataPackFromPath(ash_test_resources_200, ui::SCALE_FACTOR_200P);
base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_);
env_ = aura::Env::CreateInstance();
« no previous file with comments | « ash/sysui/sysui_application.cc ('k') | mash/test/mash_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698