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

Unified Diff: ash/test/ash_test_environment_default.cc

Issue 2316803002: Splits ash_test_resources_100_percent into two pak files (Closed)
Patch Set: 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
Index: ash/test/ash_test_environment_default.cc
diff --git a/ash/test/ash_test_environment_default.cc b/ash/test/ash_test_environment_default.cc
index f1d9d3280e87eb246058e77d6565ad0fb3f2b5bc..6ee93d8fa499b01b886fae9d0880dc561b4ccb47 100644
--- a/ash/test/ash_test_environment_default.cc
+++ b/ash/test/ash_test_environment_default.cc
@@ -5,11 +5,14 @@
#include "ash/test/ash_test_environment.h"
#include "ash/test/ash_test_views_delegate.h"
+#include "base/files/file_path.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
+#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/test/sequenced_worker_pool_owner.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "ui/base/resource/resource_bundle.h"
namespace ash {
namespace test {
@@ -53,5 +56,17 @@ std::unique_ptr<AshTestEnvironment> AshTestEnvironment::Create() {
return base::MakeUnique<AshTestEnvironmentDefault>();
}
+// static
+void AshTestEnvironment::AddDataPacks() {
+ base::FilePath path;
+ PathService::Get(base::DIR_MODULE, &path);
+ ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
+ if (ui::ResourceBundle::IsScaleFactorSupported(ui::SCALE_FACTOR_100P)) {
+ base::FilePath ash_test_resources_100 =
+ path.Append(FILE_PATH_LITERAL("ash_test_resources_100_percent.pak"));
+ rb.AddDataPackFromPath(ash_test_resources_100, ui::SCALE_FACTOR_100P);
+ }
+}
+
} // namespace test
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698