diff options
author | John Abd-El-Malek <jam@chromium.org> | 2015-01-20 22:03:13 -0800 |
---|---|---|
committer | John Abd-El-Malek <jam@chromium.org> | 2015-01-21 06:05:23 +0000 |
commit | 045c9bf1d36f35643a077891dedf24054f2032a3 (patch) | |
tree | 34d04302888fcf48264d7c1cc90a84e58022f343 /components/components_tests.gyp | |
parent | aa928ff8aa04cba903718f2bad61bce06b763343 (diff) | |
download | chromium_src-045c9bf1d36f35643a077891dedf24054f2032a3.zip chromium_src-045c9bf1d36f35643a077891dedf24054f2032a3.tar.gz chromium_src-045c9bf1d36f35643a077891dedf24054f2032a3.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=thakis@chromium.org
Review URL: https://codereview.chromium.org/856163002
Cr-Commit-Position: refs/heads/master@{#312306}
Diffstat (limited to 'components/components_tests.gyp')
-rw-r--r-- | components/components_tests.gyp | 27 |
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', |