diff options
author | tapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 04:33:56 +0000 |
---|---|---|
committer | tapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 04:33:56 +0000 |
commit | b4c72667519699208beea04f88c8b3fdd27683d7 (patch) | |
tree | 6f3572410846ed8900c8a15d178045ebf80a2016 /ui/ui_unittests.gyp | |
parent | db8cf5249e2a6df9ce134894e95d8636567cc458 (diff) | |
download | chromium_src-b4c72667519699208beea04f88c8b3fdd27683d7.zip chromium_src-b4c72667519699208beea04f88c8b3fdd27683d7.tar.gz chromium_src-b4c72667519699208beea04f88c8b3fdd27683d7.tar.bz2 |
Introduce a mock ui_unittests Framework for loading resources.
This allows ui_unittests to stop depending on the chrome framework.
On Mac, this creates (e.g.)
- out/ui_unittests Framework.framework/
+-- Resources -> Versions/A/Resources
\-- Versions
\-- A
\-- Resources
+-- Info.plist
+-- am.lproj
| \-- locale.pak
+-- ...
+-- chrome_100_percent.pak -> ui_test.pak
+-- ...
+-- en.lproj
| \-- locale.pak
+-- ...
On other platforms, out/ui_test.pak is loaded directly and
out/ui_unittests_strings/ is set as the locale folder (for tests that
load en-US.pak from there). ui_unittests currently depends on
out/locales/ which is only created when Chrome is built.
Note that ui_unittests does not currently succeed in a clobber build
(crbug.com/347851), so that missing dependency is fixed by this change
as well.
BUG=331669, 35878, 347851
TEST=ui_unittests should build and run after clobbering the build folder
Previously Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255512
Review URL: https://codereview.chromium.org/152543005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/ui_unittests.gyp')
-rw-r--r-- | ui/ui_unittests.gyp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/ui/ui_unittests.gyp b/ui/ui_unittests.gyp index a96bc72..ed20e60 100644 --- a/ui/ui_unittests.gyp +++ b/ui/ui_unittests.gyp @@ -62,7 +62,6 @@ 'dependencies': [ '../base/base.gyp:base', '../base/base.gyp:test_support_base', - '../chrome/chrome_resources.gyp:packed_resources', '../skia/skia.gyp:skia', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', @@ -74,6 +73,7 @@ 'events/events.gyp:events_base', 'gfx/gfx.gyp:gfx_test_support', 'resources/ui_resources.gyp:ui_resources', + 'resources/ui_resources.gyp:ui_test_pak', 'ui.gyp:ui', 'ui_test_support', ], @@ -285,6 +285,11 @@ 'dependencies': [ 'events/events.gyp:events_test_support', 'gfx/gfx.gyp:gfx_test_support', + 'ui_unittests_bundle', + ], + }, { # OS!="mac" + 'dependencies': [ + 'base/strings/ui_strings.gyp:ui_unittest_strings', ], }], ['use_aura==1 or toolkit_views==1', { @@ -335,6 +340,19 @@ }, ], 'conditions': [ + # Mac target to build a test Framework bundle to mock out resource loading. + ['OS == "mac"', { + 'targets': [ + { + 'target_name': 'ui_unittests_bundle', + 'type': 'shared_library', + 'dependencies': [ + 'resources/ui_resources.gyp:ui_test_pak', + ], + 'includes': [ 'ui_unittests_bundle.gypi' ], + }, + ], + }], # Special target to wrap a gtest_target_type==shared_library # ui_unittests into an android apk for execution. # See base.gyp for TODO(jrg)s about this strategy. |