Revert 233759 "Make NativeTextfieldViews update the win system c..."
[chromium-blink-merge.git] / components / components_tests.gyp
blob990c65321918cc9e33d3cd700b9aed645d20e9c6
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'variables': {
7     # This turns on e.g. the filename-based detection of which
8     # platforms to include source files on (e.g. files ending in
9     # _mac.h or _mac.cc are only compiled on MacOSX).
10     'chromium_code': 1,
11    },
12   'conditions': [
13     ['android_webview_build == 0', {
14       'targets': [
15         {
16           'target_name': 'components_unittests',
17           'type': '<(gtest_target_type)',
18           'sources': [
19             'auto_login_parser/auto_login_parser_unittest.cc',
20             'autofill/core/browser/webdata/autofill_entry_unittest.cc',
21             'autofill/core/common/form_data_unittest.cc',
22             'autofill/core/common/form_field_data_unittest.cc',
23             'autofill/core/common/password_form_fill_data_unittest.cc',
24             'browser_context_keyed_service/browser_context_dependency_manager_unittest.cc',
25             'browser_context_keyed_service/dependency_graph_unittest.cc',
26             'dom_distiller/core/article_entry_unittest.cc',
27             'dom_distiller/core/distiller_unittest.cc',
28             'dom_distiller/core/distiller_url_fetcher_unittest.cc',
29             'dom_distiller/core/dom_distiller_database_unittest.cc',
30             'dom_distiller/core/dom_distiller_model_unittest.cc',
31             'dom_distiller/core/dom_distiller_service_unittest.cc',
32             'dom_distiller/core/dom_distiller_store_unittest.cc',
33             'dom_distiller/core/fake_distiller.cc',
34             'dom_distiller/core/fake_distiller.h',
35             'dom_distiller/core/task_tracker_unittest.cc',
36             'json_schema/json_schema_validator_unittest.cc',
37             'json_schema/json_schema_validator_unittest_base.cc',
38             'json_schema/json_schema_validator_unittest_base.h',
39             'navigation_interception/intercept_navigation_resource_throttle_unittest.cc',
40             'precache/core/precache_fetcher_unittest.cc',
41             'sessions/serialized_navigation_entry_unittest.cc',
42             'test/run_all_unittests.cc',
43             'translate/common/translate_metrics_unittest.cc',
44             'translate/common/translate_util_unittest.cc',
45             'translate/language_detection/language_detection_util_unittest.cc',
46             # TODO(asvitkine): These should be tested on iOS too.
47             'variations/entropy_provider_unittest.cc',
48             'variations/metrics_util_unittest.cc',
49             'variations/variations_associated_data_unittest.cc',
50             'variations/variations_seed_processor_unittest.cc',
51             'visitedlink/test/visitedlink_unittest.cc',
52             'webdata/encryptor/encryptor_password_mac_unittest.cc',
53             'webdata/encryptor/encryptor_unittest.cc',
54             'webdata/encryptor/ie7_password_unittest_win.cc',
55             'web_modal/web_contents_modal_dialog_manager_unittest.cc',
56           ],
57           'include_dirs': [
58             '..',
59           ],
60           'dependencies': [
61             '../base/base.gyp:test_support_base',
62             '../sync/sync.gyp:sync',
63             '../testing/gmock.gyp:gmock',
64             '../testing/gtest.gyp:gtest',
66             # Dependencies of autofill
67             'components.gyp:autofill_core_browser',
68             'components.gyp:autofill_core_common',
70             # Dependencies of auto_login_parser
71             'components.gyp:auto_login_parser',
73             # Dependencies of browser_context_keyed_service
74             'components.gyp:browser_context_keyed_service',
76             # Dependencies of dom_distiller
77             'components.gyp:distilled_page_proto',
78             'components.gyp:dom_distiller_core',
80             # Dependencies of encryptor
81             'components.gyp:encryptor',
83             # Dependencies of json_schema
84             'components.gyp:json_schema',
86             # Dependencies of intercept_navigation_resource_throttle_unittest.cc
87             '../content/content_shell_and_tests.gyp:test_support_content',
88             '../skia/skia.gyp:skia',
89             'components.gyp:navigation_interception',
91             # Dependencies of policy
92             'components.gyp:policy_component',
94             # Dependencies of precache
95             'components.gyp:precache_core',
96             'components.gyp:precache_core_proto',
98             # Dependencies of sessions
99             '../third_party/protobuf/protobuf.gyp:protobuf_lite',
100             'components.gyp:sessions',
101             'components.gyp:sessions_test_support',
103             # Dependencies of translate.
104             'components.gyp:translate_common',
105             'components.gyp:translate_language_detection',
107             # Dependencies of variations
108             'components.gyp:variations',
110             # Dependencies of visitedlink
111             'components.gyp:visitedlink_browser',
112             'components.gyp:visitedlink_renderer',
113             '../content/content_resources.gyp:content_resources',
115             'components.gyp:web_modal',
116             'components.gyp:web_modal_test_support',
117           ],
118           'conditions': [
119             ['OS == "ios"', {
120               'sources/': [
121                 ['exclude', '\\.cc$'],
122                 ['include', '^test/run_all_unittests\\.cc$'],
123                 # TODO(ios): Include files here as they are made to work, see
124                 # http://crbug.com/303011.
125                 # TODO(asvitkine): Bring up varations/ unittests on iOS.
126                 ['include', '^dom_distiller'],
127                 ['include', '^translate'],
128               ],
129               'dependencies!': [
130                 'autofill_core_common',
131                 'navigation_interception',
132                 'visitedlink_renderer',
133               ],
134             }],
135             ['disable_nacl==0', {
136               'sources': [
137                 'nacl/browser/nacl_validation_cache_unittest.cc',
138                 'nacl/browser/pnacl_translation_cache_unittest.cc',
139               ],
140               'dependencies': [
141                 'nacl.gyp:nacl_browser',
142                 'nacl_common.gyp:nacl_common',
143               ],
144             }],
145             ['OS == "android"', {
146               'sources!': [
147                 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
148               ],
149               'dependencies!': [
150                 'components.gyp:web_modal',
151                 'components.gyp:web_modal_test_support',
152               ],
153             }],
154             ['OS == "android" and gtest_target_type == "shared_library"', {
155               'dependencies': [
156                 '../testing/android/native_test.gyp:native_test_native_code',
157               ]
158             }],
159             ['OS=="win" and win_use_allocator_shim==1', {
160               'dependencies': [
161                 '../base/allocator/allocator.gyp:allocator',
162               ],
163             }],
164             ['OS=="linux" and component=="shared_library" and linux_use_tcmalloc==1', {
165             'dependencies': [
166                 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
167             ],
168             'link_settings': {
169                 'ldflags': ['-rdynamic'],
170             },
171             }],
172             ['configuration_policy==1', {
173               'sources': [
174                 'policy/core/common/schema_unittest.cc',
175               ],
176             }],
177           ],
178           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
179           'msvs_disabled_warnings': [4267, ],
180         },
181       ],
182     }],
183     ['OS != "ios" and android_webview_build == 0', {
184       'targets': [
185         {
186           'target_name': 'components_perftests',
187           'type': '<(gtest_target_type)',
188           'dependencies': [
189             '../base/base.gyp:base',
190             '../base/base.gyp:test_support_perf',
191             '../content/content_shell_and_tests.gyp:test_support_content',
192             '../testing/gtest.gyp:gtest',
193             '../ui/compositor/compositor.gyp:compositor',
194             'components.gyp:visitedlink_browser',
195           ],
196          'include_dirs': [
197            '..',
198          ],
199          'sources': [
200            'visitedlink/test/visitedlink_perftest.cc',
201          ],
202          'conditions': [
203            ['OS == "android" and gtest_target_type == "shared_library"', {
204              'dependencies': [
205                '../testing/android/native_test.gyp:native_test_native_code',
206              ],
207            }],
208          ],
209          # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
210          'msvs_disabled_warnings': [ 4267, ],
211         },
212       ],
213       'conditions': [
214         ['OS == "android" and gtest_target_type == "shared_library"', {
215           'targets': [
216             {
217               'target_name': 'components_unittests_apk',
218               'type': 'none',
219               'dependencies': [
220                 'components_unittests',
221               ],
222               'variables': {
223                 'test_suite_name': 'components_unittests',
224                 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)components_unittests<(SHARED_LIB_SUFFIX)',
225               },
226               'includes': [ '../build/apk_test.gypi' ],
227             },
228           ],
229         }],
230       ],
231     }],
232     ['OS!="ios"', {
233       'targets': [
234         {
235           'target_name': 'components_browsertests',
236           'type': '<(gtest_target_type)',
237           'defines!': ['CONTENT_IMPLEMENTATION'],
238           'dependencies': [
239             '../content/content_shell_and_tests.gyp:content_browser_test_support',
240             '../content/content_shell_and_tests.gyp:test_support_content',
241             '../skia/skia.gyp:skia',
242             '../testing/gtest.gyp:gtest',
243             'components.gyp:dom_distiller_content',
244             'components.gyp:dom_distiller_core',
245           ],
246           'include_dirs': [
247             '..',
248           ],
249           'defines': [
250             'HAS_OUT_OF_PROC_TEST_RUNNER',
251           ],
252           'sources': [
253             '../content/test/content_test_launcher.cc',
254             'dom_distiller/content/distiller_page_web_contents_browsertest.cc',
255           ],
256           'conditions': [
257             ['OS=="win"', {
258               'resource_include_dirs': [
259                 '<(SHARED_INTERMEDIATE_DIR)/webkit',
260               ],
261               'sources': [
262                 '../content/shell/app/resource.h',
263                 '../content/shell/app/shell.rc',
264                 # TODO:  It would be nice to have these pulled in
265                 # automatically from direct_dependent_settings in
266                 # their various targets (net.gyp:net_resources, etc.),
267                 # but that causes errors in other targets when
268                 # resulting .res files get referenced multiple times.
269                 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
270                 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.rc',
271                 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.rc',
272               ],
273               'dependencies': [
274                 '<(DEPTH)/net/net.gyp:net_resources',
275                 '<(DEPTH)/third_party/iaccessible2/iaccessible2.gyp:iaccessible2',
276                 '<(DEPTH)/third_party/isimpledom/isimpledom.gyp:isimpledom',
277                 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
278                 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
279               ],
280               'configurations': {
281                 'Debug_Base': {
282                   'msvs_settings': {
283                     'VCLinkerTool': {
284                       'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
285                     },
286                   },
287                 },
288               },
289               # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
290               'msvs_disabled_warnings': [ 4267, ],
291             }],
292             ['OS=="win" and win_use_allocator_shim==1', {
293               'dependencies': [
294                 '../base/allocator/allocator.gyp:allocator',
295               ],
296             }],
297           ],
298         },
299       ],
300     }],
301   ],