summaryrefslogtreecommitdiffstats
path: root/components/components_tests.gyp
diff options
context:
space:
mode:
authorJohn Abd-El-Malek <jam@chromium.org>2015-01-21 07:24:52 -0800
committerJohn Abd-El-Malek <jam@chromium.org>2015-01-21 15:26:40 +0000
commite98e8e7654b7e51f98e92514897f8e1284eaa571 (patch)
treea1957153136fda11825db6cdfdbf4446050870c6 /components/components_tests.gyp
parent38a6fabc90e33b0439a186fa0d222c60d874a35d (diff)
downloadchromium_src-e98e8e7654b7e51f98e92514897f8e1284eaa571.zip
chromium_src-e98e8e7654b7e51f98e92514897f8e1284eaa571.tar.gz
chromium_src-e98e8e7654b7e51f98e92514897f8e1284eaa571.tar.bz2
Eliminate components_unittests' dependence on chrome resources.
This CL changes components_unittests to create its own pakfile rather than relying on the chrome pakfile. To do this it adds a repack step that repacks the pakfiles that components_unittests needs into a components_unittests_resources.pak file, and then loads that pakfile explicitly. This change means that components_unittests now passes after a clean build, whereas before it would fail due to missing resources. This is based on blundell's change: https://codereview.chromium.org/258043003/ BUG=348563,450464 R=blundell@chromium.org, thakis@chromium.org Committed: https://chromium.googlesource.com/chromium/src/+/045c9bf1d36f35643a077891dedf24054f2032a3 Review URL: https://codereview.chromium.org/856163002 Cr-Commit-Position: refs/heads/master@{#312390}
Diffstat (limited to 'components/components_tests.gyp')
-rw-r--r--components/components_tests.gyp27
1 files changed, 22 insertions, 5 deletions
diff --git a/components/components_tests.gyp b/components/components_tests.gyp
index 77cfc0b..bc2dab2 100644
--- a/components/components_tests.gyp
+++ b/components/components_tests.gyp
@@ -311,9 +311,6 @@
'dependencies': [
'../base/base.gyp:base_prefs_test_support',
'../base/base.gyp:test_support_base',
- # TODO(blundell): Eliminate this dependency by having
- # components_unittests have its own pakfile. crbug.com/348563
- '../chrome/chrome_resources.gyp:packed_extra_resources',
# TODO(blundell): Eliminate the need for this dependency in code
# that iOS shares. crbug.com/325243
'../content/content_shell_and_tests.gyp:test_support_content',
@@ -325,6 +322,8 @@
'../ui/base/ui_base.gyp:ui_base',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/gfx.gyp:gfx_test_support',
+ '../ui/resources/ui_resources.gyp:ui_resources',
+ '../ui/strings/ui_strings.gyp:ui_strings',
'components_resources.gyp:components_resources',
@@ -516,6 +515,25 @@
'components.gyp:web_resource_test_support',
'../base/base.gyp:base',
],
+ 'actions': [
+ {
+ 'action_name': 'repack_components_pak',
+ 'variables': {
+ 'pak_inputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/components/components_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/components/strings/components_strings_en-US.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
+ ],
+ 'pak_output': '<(PRODUCT_DIR)/components_unittests_resources.pak',
+ },
+ 'includes': [ '../build/repack_action.gypi' ],
+ },
+ ],
+ 'mac_bundle_resources': [
+ '<(PRODUCT_DIR)/components_unittests_resources.pak',
+ ],
'conditions': [
['toolkit_views == 1', {
'sources': [
@@ -621,7 +639,6 @@
}],
],
}, { # 'OS == "ios"'
- 'includes': ['../chrome/chrome_ios_bundle_resources.gypi'],
'sources': [
'webp_transcode/webp_decoder_unittest.mm',
],
@@ -1063,7 +1080,7 @@
],
'actions': [
{
- 'action_name': 'repack_components_pack',
+ 'action_name': 'repack_components_pak',
'variables': {
'pak_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/components/components_resources.pak',