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

Unified Diff: components/test/run_all_unittests.cc

Issue 1115033003: resources: Prevent including the same resource in multiple pack files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 8 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: components/test/run_all_unittests.cc
diff --git a/components/test/run_all_unittests.cc b/components/test/run_all_unittests.cc
index 5cd4102f9f55014ecf5422a1ef4e9e39de409cb2..ae770949ab92362e4251c1aa78acc8dff937527e 100644
--- a/components/test/run_all_unittests.cc
+++ b/components/test/run_all_unittests.cc
@@ -61,8 +61,19 @@ class ComponentsTestSuite : public base::TestSuite {
#else
PathService::Get(base::DIR_MODULE, &pak_path);
#endif
+
+#if defined(OS_IOS) || defined(OS_ANDROID)
ui::ResourceBundle::InitSharedInstanceWithPakPath(
pak_path.AppendASCII("components_tests_resources.pak"));
+#else
+ base::FilePath ui_test_pak_path;
+ ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
+ ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
+
+ ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
+ pak_path.AppendASCII("components_tests_resources.pak"),
+ ui::SCALE_FACTOR_NONE);
+#endif
// These schemes need to be added globally to pass tests of
// autocomplete_input_unittest.cc and content_settings_pattern*

Powered by Google App Engine
This is Rietveld 408576698