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

Unified Diff: ash/test/test_suite.cc

Issue 2316803002: Splits ash_test_resources_100_percent into two pak files (Closed)
Patch Set: feedback Created 4 years, 3 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/test/ash_test_environment_default.cc ('k') | no next file » | 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 eb28d27c0eafbfe9185a2c24def12972e519a585..33dedc1bace134da4757824a4e117b7b5b2bb2be 100644
--- a/ash/test/test_suite.cc
+++ b/ash/test/test_suite.cc
@@ -5,6 +5,7 @@
#include "ash/test/test_suite.h"
#include "ash/common/ash_switches.h"
+#include "ash/test/ash_test_environment.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/i18n/rtl.h"
@@ -58,17 +59,20 @@ void AuraShellTestSuite::Initialize() {
PathService::Get(base::DIR_MODULE, &path);
base::FilePath ash_test_strings =
path.Append(FILE_PATH_LITERAL("ash_test_strings.pak"));
- base::FilePath ash_test_resources_100 =
- path.Append(FILE_PATH_LITERAL("ash_test_resources_100_percent.pak"));
- base::FilePath ash_test_resources_200 =
- path.Append(FILE_PATH_LITERAL("ash_test_resources_200_percent.pak"));
-
ui::ResourceBundle::InitSharedInstanceWithPakPath(ash_test_strings);
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- 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);
+
+ if (ui::ResourceBundle::IsScaleFactorSupported(ui::SCALE_FACTOR_100P)) {
+ base::FilePath ash_test_resources_100 =
+ path.AppendASCII(AshTestEnvironment::Get100PercentResourceFileName());
+ ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
+ ash_test_resources_100, ui::SCALE_FACTOR_100P);
+ }
+ if (ui::ResourceBundle::IsScaleFactorSupported(ui::SCALE_FACTOR_200P)) {
+ base::FilePath ash_test_resources_200 =
+ path.Append(FILE_PATH_LITERAL("ash_test_resources_200_percent.pak"));
+ ui::ResourceBundle::GetSharedInstance().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/test/ash_test_environment_default.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698