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

Unified Diff: ash/test/ash_test_environment_content.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_content.cc
diff --git a/ash/test/ash_test_environment_content.cc b/ash/test/ash_test_environment_content.cc
index 0e5123730ab39b6f5872b57c62ce53e0675b75ed..78fe1bbb1bf17f19f8ac48a1fda7efdd6f768e80 100644
--- a/ash/test/ash_test_environment_content.cc
+++ b/ash/test/ash_test_environment_content.cc
@@ -6,10 +6,13 @@
#include "ash/test/ash_test_views_delegate.h"
#include "ash/test/content/test_shell_content_state.h"
+#include "base/files/file_path.h"
#include "base/memory/ptr_util.h"
+#include "base/path_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/web_contents_tester.h"
+#include "ui/base/resource/resource_bundle.h"
namespace ash {
namespace test {
@@ -39,6 +42,18 @@ std::unique_ptr<AshTestEnvironment> AshTestEnvironment::Create() {
return base::MakeUnique<AshTestEnvironmentContent>();
}
+// 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_content_100_percent.pak"));
+ rb.AddDataPackFromPath(ash_test_resources_100, ui::SCALE_FACTOR_100P);
+ }
+}
+
AshTestEnvironmentContent::AshTestEnvironmentContent()
: thread_bundle_(base::MakeUnique<content::TestBrowserThreadBundle>()) {}

Powered by Google App Engine
This is Rietveld 408576698