summaryrefslogtreecommitdiffstats
path: root/components/test
diff options
context:
space:
mode:
authorsadrul <sadrul@chromium.org>2015-05-13 09:09:53 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-13 16:10:07 +0000
commit618bc16b18999137337aaed4ad87f99e8563093c (patch)
treee74115c059aa39357cb5ce106e797d4600af2c1c /components/test
parent7afeb6d2e431dbcda688226a434131a33b7ce71f (diff)
downloadchromium_src-618bc16b18999137337aaed4ad87f99e8563093c.zip
chromium_src-618bc16b18999137337aaed4ad87f99e8563093c.tar.gz
chromium_src-618bc16b18999137337aaed4ad87f99e8563093c.tar.bz2
resources: Prevent including the same resource in multiple pack files.
Add code to cause failure at runtime if a resource-pack includes a resource that is already present in another resource-pack. BUG=471609 Review URL: https://codereview.chromium.org/1115033003 Cr-Commit-Position: refs/heads/master@{#329646}
Diffstat (limited to 'components/test')
-rw-r--r--components/test/run_all_unittests.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/components/test/run_all_unittests.cc b/components/test/run_all_unittests.cc
index 5cd4102..9b59628 100644
--- a/components/test/run_all_unittests.cc
+++ b/components/test/run_all_unittests.cc
@@ -61,8 +61,14 @@ class ComponentsTestSuite : public base::TestSuite {
#else
PathService::Get(base::DIR_MODULE, &pak_path);
#endif
- ui::ResourceBundle::InitSharedInstanceWithPakPath(
- pak_path.AppendASCII("components_tests_resources.pak"));
+
+ 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);
// These schemes need to be added globally to pass tests of
// autocomplete_input_unittest.cc and content_settings_pattern*