Revert 264226 "Reduce dependency of TiclInvalidationService on P..."
[chromium-blink-merge.git] / components / components_tests.gyp
blob828c9abb2c159e4aa65b518a6dd9f946efdda6cf
1 # Copyright 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     'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/components',
12    },
13   'conditions': [
14     ['android_webview_build == 0', {
15       'targets': [
16         {
17           'target_name': 'components_unittests',
18           'type': '<(gtest_target_type)',
19           'sources': [
20             'auto_login_parser/auto_login_parser_unittest.cc',
21             'autofill/content/browser/content_autofill_driver_unittest.cc',
22             'autofill/content/browser/request_autocomplete_manager_unittest.cc',
23             'autofill/content/browser/wallet/full_wallet_unittest.cc',
24             'autofill/content/browser/wallet/instrument_unittest.cc',
25             'autofill/content/browser/wallet/wallet_address_unittest.cc',
26             'autofill/content/browser/wallet/wallet_client_unittest.cc',
27             'autofill/content/browser/wallet/wallet_items_unittest.cc',
28             'autofill/content/browser/wallet/wallet_service_url_unittest.cc',
29             'autofill/content/browser/wallet/wallet_signin_helper_unittest.cc',
30             'autofill/core/browser/address_field_unittest.cc',
31             'autofill/core/browser/address_unittest.cc',
32             'autofill/core/browser/android/auxiliary_profile_unittest_android.cc',
33             'autofill/core/browser/autocomplete_history_manager_unittest.cc',
34             'autofill/core/browser/autofill_country_unittest.cc',
35             'autofill/core/browser/autofill_data_model_unittest.cc',
36             'autofill/core/browser/autofill_download_unittest.cc',
37             'autofill/core/browser/autofill_external_delegate_unittest.cc',
38             'autofill/core/browser/autofill_field_unittest.cc',
39             'autofill/core/browser/autofill_ie_toolbar_import_win_unittest.cc',
40             'autofill/core/browser/autofill_manager_unittest.cc',
41             'autofill/core/browser/autofill_merge_unittest.cc',
42             'autofill/core/browser/autofill_metrics_unittest.cc',
43             'autofill/core/browser/autofill_profile_unittest.cc',
44             'autofill/core/browser/autofill_regexes_unittest.cc',
45             'autofill/core/browser/autofill_type_unittest.cc',
46             'autofill/core/browser/autofill_xml_parser_unittest.cc',
47             'autofill/core/browser/contact_info_unittest.cc',
48             'autofill/core/browser/credit_card_field_unittest.cc',
49             'autofill/core/browser/credit_card_unittest.cc',
50             'autofill/core/browser/form_field_unittest.cc',
51             'autofill/core/browser/form_structure_unittest.cc',
52             'autofill/core/browser/name_field_unittest.cc',
53             'autofill/core/browser/password_autofill_manager_unittest.cc',
54             'autofill/core/browser/password_generator_unittest.cc',
55             'autofill/core/browser/personal_data_manager_unittest.cc',
56             'autofill/core/browser/phone_field_unittest.cc',
57             'autofill/core/browser/phone_number_i18n_unittest.cc',
58             'autofill/core/browser/phone_number_unittest.cc',
59             'autofill/core/browser/validation_unittest.cc',
60             'autofill/core/browser/webdata/autofill_profile_syncable_service_unittest.cc',
61             'autofill/core/browser/webdata/autofill_table_unittest.cc',
62             'autofill/core/browser/webdata/web_data_service_unittest.cc',
63             'autofill/core/common/form_data_unittest.cc',
64             'autofill/core/common/form_field_data_unittest.cc',
65             'autofill/core/common/password_form_fill_data_unittest.cc',
66             'autofill/core/common/save_password_progress_logger_unittest.cc',
67             'cloud_devices/printer_description_unittest.cc',
68             'data_reduction_proxy/browser/data_reduction_proxy_metrics_unittest.cc',
69             'data_reduction_proxy/browser/data_reduction_proxy_settings_unittest.cc',
70             'data_reduction_proxy/browser/http_auth_handler_data_reduction_proxy_unittest.cc',
71             'dom_distiller/core/article_entry_unittest.cc',
72             'dom_distiller/core/distiller_unittest.cc',
73             'dom_distiller/core/distiller_url_fetcher_unittest.cc',
74             'dom_distiller/core/dom_distiller_database_unittest.cc',
75             'dom_distiller/core/dom_distiller_model_unittest.cc',
76             'dom_distiller/core/dom_distiller_service_unittest.cc',
77             'dom_distiller/core/dom_distiller_store_unittest.cc',
78             'dom_distiller/core/task_tracker_unittest.cc',
79             'dom_distiller/core/url_utils_unittest.cc',
80             'dom_distiller/core/viewer_unittest.cc',
81             'domain_reliability/context_unittest.cc',
82             'domain_reliability/dispatcher_unittest.cc',
83             'domain_reliability/monitor_unittest.cc',
84             'domain_reliability/scheduler_unittest.cc',
85             'domain_reliability/test_util.cc',
86             'domain_reliability/test_util.h',
87             'domain_reliability/uploader_unittest.cc',
88             'domain_reliability/util_unittest.cc',
89             'json_schema/json_schema_validator_unittest.cc',
90             'json_schema/json_schema_validator_unittest_base.cc',
91             'json_schema/json_schema_validator_unittest_base.h',
92             'keyed_service/content/browser_context_dependency_manager_unittest.cc',
93             'keyed_service/core/dependency_graph_unittest.cc',
94             'language_usage_metrics/language_usage_metrics_unittest.cc',
95             'metrics/metrics_hashes_unittest.cc',
96             'navigation_interception/intercept_navigation_resource_throttle_unittest.cc',
97             'os_crypt/ie7_password_win_unittest.cc',
98             'os_crypt/keychain_password_mac_unittest.mm',
99             'os_crypt/os_crypt_unittest.cc',
100             'password_manager/core/browser/browser_save_password_progress_logger_unittest.cc',
101             'password_manager/core/browser/login_database_unittest.cc',
102             'password_manager/core/browser/password_form_manager_unittest.cc',
103             'password_manager/core/browser/password_generation_manager_unittest.cc',
104             'password_manager/core/browser/password_manager_unittest.cc',
105             'password_manager/core/browser/password_store_default_unittest.cc',
106             'password_manager/core/browser/password_store_unittest.cc',
107             'password_manager/core/browser/password_syncable_service_unittest.cc',
108             'password_manager/core/browser/psl_matching_helper_unittest.cc',
109             'precache/content/precache_manager_unittest.cc',
110             'precache/core/precache_database_unittest.cc',
111             'precache/core/precache_fetcher_unittest.cc',
112             'precache/core/precache_url_table_unittest.cc',
113             'query_parser/query_parser_unittest.cc',
114             'query_parser/snippet_unittest.cc',
115             'rappor/bloom_filter_unittest.cc',
116             'rappor/byte_vector_utils_unittest.cc',
117             'rappor/log_uploader_unittest.cc',
118             'rappor/rappor_metric_unittest.cc',
119             'rappor/rappor_service_unittest.cc',
120             'sessions/serialized_navigation_entry_unittest.cc',
121             'signin/core/browser/mutable_profile_oauth2_token_service_unittest.cc',
122             'signin/core/browser/signin_error_controller_unittest.cc',
123             'signin/core/browser/webdata/token_service_table_unittest.cc',
124             'signin/ios/browser/profile_oauth2_token_service_ios_unittest.mm',
125             'storage_monitor/image_capture_device_manager_unittest.mm',
126             'storage_monitor/media_storage_util_unittest.cc',
127             'storage_monitor/media_transfer_protocol_device_observer_linux_unittest.cc',
128             'storage_monitor/storage_info_unittest.cc',
129             'storage_monitor/storage_monitor_chromeos_unittest.cc',
130             'storage_monitor/storage_monitor_linux_unittest.cc',
131             'storage_monitor/storage_monitor_mac_unittest.mm',
132             'storage_monitor/storage_monitor_unittest.cc',
133             'storage_monitor/storage_monitor_win_unittest.cc',
134             'sync_driver/model_association_manager_unittest.cc',
135             'sync_driver/sync_prefs_unittest.cc',
136             'sync_driver/system_encryptor_unittest.cc',
137             'test/run_all_unittests.cc',
138             'translate/core/browser/language_state_unittest.cc',
139             'translate/core/browser/translate_browser_metrics_unittest.cc',
140             'translate/core/browser/translate_prefs_unittest.cc',
141             'translate/core/browser/translate_script_unittest.cc',
142             'translate/core/common/translate_metrics_unittest.cc',
143             'translate/core/common/translate_util_unittest.cc',
144             'translate/language_detection/language_detection_util_unittest.cc',
145             'url_matcher/regex_set_matcher_unittest.cc',
146             'url_matcher/string_pattern_unittest.cc',
147             'url_matcher/substring_set_matcher_unittest.cc',
148             'url_matcher/url_matcher_factory_unittest.cc',
149             'url_matcher/url_matcher_unittest.cc',
150             'variations/entropy_provider_unittest.cc',
151             'variations/metrics_util_unittest.cc',
152             'variations/study_filtering_unittest.cc',
153             'variations/variations_associated_data_unittest.cc',
154             'variations/variations_seed_processor_unittest.cc',
155             'variations/variations_seed_simulator_unittest.cc',
156             'visitedlink/test/visitedlink_unittest.cc',
157             'web_modal/web_contents_modal_dialog_manager_unittest.cc',
158           ],
159           'include_dirs': [
160             '..',
161           ],
162           'dependencies': [
163             '../base/base.gyp:base_prefs_test_support',
164             '../base/base.gyp:test_support_base',
165             # TODO(blundell): Eliminate this dependency by having
166             # components_unittests have its own pakfile. crbug.com/348563
167             '../chrome/chrome_resources.gyp:packed_extra_resources',
168             # TODO(blundell): Eliminate the need for this dependency in code
169             # that iOS shares. crbug.com/325243
170             '../content/content_shell_and_tests.gyp:test_support_content',
171             '../sync/sync.gyp:sync',
172             '../sync/sync.gyp:test_support_sync_api',
173             '../testing/gmock.gyp:gmock',
174             '../testing/gtest.gyp:gtest',
175             '../ui/base/ui_base.gyp:ui_base',
176             '../ui/gfx/gfx.gyp:gfx',
178             'components_resources.gyp:components_resources',
180             # Dependencies of auto_login_parser
181             'components.gyp:auto_login_parser',
183             # Dependencies of autofill
184             'components.gyp:autofill_core_browser',
185             'components.gyp:autofill_core_common',
186             'components.gyp:autofill_core_test_support',
187             'components_strings.gyp:components_strings',
188             '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber',
190             # Dependencies of cloud_devices
191             'components.gyp:cloud_devices',
193             # Dependencies of data_reduction_proxy
194             'components.gyp:data_reduction_proxy_browser',
195             'components.gyp:data_reduction_proxy_common',
196             'components.gyp:data_reduction_proxy_test_support',
198             # Dependencies of dom_distiller
199             'components.gyp:distilled_page_proto',
200             'components.gyp:dom_distiller_core',
201             'components.gyp:dom_distiller_test_support',
203             # Dependencies of domain_reliability
204             'components.gyp:domain_reliability',
206             # Dependencies of json_schema
207             'components.gyp:json_schema',
209             # Dependencies of keyed_service
210             'components.gyp:keyed_service_core',
212             # Dependencies of language_usage_metrics
213             'components.gyp:language_usage_metrics',
215             # Dependencies of os_crypt
216             'components.gyp:os_crypt',
218             # Dependencies of password_manager
219             'components.gyp:password_manager_core_browser',
220             'components.gyp:password_manager_core_browser_test_support',
222             # Dependencies of precache/core
223             'components.gyp:password_manager_core_browser',
224             'components.gyp:precache_core',
226             # Dependencies of query_parser
227             'components.gyp:query_parser',
229             # Dependencies of rappor
230             'components.gyp:rappor',
232             # Dependencies of signin
233             'components.gyp:signin_core_browser',
234             'components.gyp:signin_core_browser_test_support',
235             '../google_apis/google_apis.gyp:google_apis_test_support',
237             # Dependencies of sync_driver
238             'components.gyp:sync_driver_test_support',
240             # Dependencies of translate.
241             'components.gyp:translate_core_browser',
242             'components.gyp:translate_core_common',
243             'components.gyp:translate_language_detection',
245             # Dependencies of variations
246             'components.gyp:variations',
247           ],
248           'conditions': [
249             ['OS != "ios"', {
250               'sources': [
251                 'autofill/content/renderer/renderer_save_password_progress_logger_unittest.cc',
252                 'dom_distiller/content/dom_distiller_viewer_source_unittest.cc',
253               ],
254               'dependencies': [
255                 # Dependencies of autofill
256                 'components.gyp:autofill_content_browser',
257                 'components.gyp:autofill_content_renderer',
258                 'components.gyp:autofill_content_test_support',
260                 # Dependencies of dom_distiller
261                 'components.gyp:dom_distiller_content',
263                 # Dependencies of
264                 # intercept_navigation_resource_throttle_unittest.cc
265                 '../skia/skia.gyp:skia',
266                 'components.gyp:navigation_interception',
268                 # Dependencies of keyed_service
269                 'components.gyp:keyed_service_content',
271                 # Dependencies of precache/content
272                 'components.gyp:precache_content',
274                 # Dependencies of sessions
275                 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
276                 'components.gyp:sessions',
277                 'components.gyp:sessions_test_support',
279                 # Dependencies of storage monitor
280                 'components.gyp:storage_monitor',
281                 'components.gyp:storage_monitor_test_support',
283                 # Dependencies of url_matcher.
284                 'components.gyp:url_matcher',
286                 # Dependencies of visitedlink
287                 'components.gyp:visitedlink_browser',
288                 'components.gyp:visitedlink_renderer',
289                 '../content/content_resources.gyp:content_resources',
291                 # Dependencies of web_modal
292                 'components.gyp:web_modal',
293                 'components.gyp:web_modal_test_support',
294               ],
295             }, { # 'OS == "ios"'
296               'includes': ['../chrome/chrome_ios_bundle_resources.gypi'],
297               'sources/': [
298                 ['exclude', '\\.cc$'],
299                 ['exclude', '\\.mm$'],
300                 ['include', '^test/run_all_unittests\\.cc$'],
301                 ['include', '^auto_login_parser/'],
302                 ['include', '^autofill/core/'],
303                 ['include', '^dom_distiller/'],
304                 ['include', '^json_schema/'],
305                 ['include', '^keyed_service/core/'],
306                 ['include', '^language_usage_metrics/'],
307                 ['include', '^password_manager/'],
308                 ['include', '^precache/core/'],
309                 ['include', '^signin/'],
310                 ['include', '^sync_driver/'],
311                 ['include', '^translate/'],
312                 ['include', '^variations/'],
313               ],
314               'dependencies': [
315                 # Dependencies of signin
316                 'components.gyp:signin_ios_browser',
317                 '../ios/ios_tests.gyp:test_support_ios',
318               ],
319               'actions': [
320                 {
321                   'action_name': 'copy_test_data',
322                   'variables': {
323                     'test_data_files': [
324                       'test/data',
325                     ],
326                     'test_data_prefix': 'components',
327                   },
328                   'includes': [ '../build/copy_test_data_ios.gypi' ],
329                 },
330               ],
331               'conditions': [
332                 ['configuration_policy==1', {
333                   'sources/': [
334                     ['include', '^policy/'],
335                   ],
336                 }],
337               ],
338             }],
339             ['disable_nacl==0', {
340               'sources': [
341                 'nacl/browser/nacl_file_host_unittest.cc',
342                 'nacl/browser/nacl_process_host_unittest.cc',
343                 'nacl/browser/nacl_validation_cache_unittest.cc',
344                 'nacl/browser/pnacl_host_unittest.cc',
345                 'nacl/browser/pnacl_translation_cache_unittest.cc',
346                 'nacl/browser/test_nacl_browser_delegate.cc',
347               ],
348               'dependencies': [
349                 'nacl.gyp:nacl_browser',
350                 'nacl.gyp:nacl_common',
351               ],
352             }],
353             ['OS == "mac"', {
354               'link_settings': {
355                 'libraries': [
356                   '$(SDKROOT)/System/Library/Frameworks/AddressBook.framework',
357                   '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
358                   '$(SDKROOT)/System/Library/Frameworks/ImageCaptureCore.framework',
359                 ],
360               },
361               'sources!': [
362                 'password_manager/core/browser/password_store_default_unittest.cc',
363               ],
364             }],
365             ['OS == "android"', {
366               'sources!': [
367                 'signin/core/browser/mutable_profile_oauth2_token_service_unittest.cc',
368                 'storage_monitor/media_storage_util_unittest.cc',
369                 'storage_monitor/storage_info_unittest.cc',
370                 'storage_monitor/storage_monitor_unittest.cc',
371                 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
372               ],
373               'dependencies!': [
374                 'components.gyp:storage_monitor',
375                 'components.gyp:storage_monitor_test_support',
376                 'components.gyp:web_modal',
377                 'components.gyp:web_modal_test_support',
378               ],
379             }],
380             ['OS == "android" and gtest_target_type == "shared_library"', {
381               'dependencies': [
382                 '../testing/android/native_test.gyp:native_test_native_code',
383               ]
384             }],
385             ['chromeos==1', {
386               'sources!': [
387                 'storage_monitor/storage_monitor_linux_unittest.cc',
388               ],
389               'dependencies': [
390                 '../chromeos/chromeos.gyp:chromeos_test_support',
391               ],
392             }],
393             ['OS=="linux"', {
394               'dependencies': [
395                 '../dbus/dbus.gyp:dbus',
396                 '../device/media_transfer_protocol/media_transfer_protocol.gyp:device_media_transfer_protocol',
397               ],
398             }],
399             ['OS=="win" and win_use_allocator_shim==1', {
400               'dependencies': [
401                 '../base/allocator/allocator.gyp:allocator',
402               ],
403             }],
404             # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
405             ['OS=="linux" and component=="shared_library" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
406             'dependencies': [
407                 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
408             ],
409             'link_settings': {
410                 'ldflags': ['-rdynamic'],
411             },
412             }],
413             ['configuration_policy==1', {
414               'dependencies': [
415                 'components.gyp:policy_component',
416                 'components.gyp:policy_component_test_support',
417                 'components.gyp:policy_test_support',
418               ],
419               'sources': [
420                 'policy/core/browser/autofill_policy_handler_unittest.cc',
421                 'policy/core/browser/browser_policy_connector_unittest.cc',
422                 'policy/core/browser/configuration_policy_handler_unittest.cc',
423                 'policy/core/browser/configuration_policy_pref_store_unittest.cc',
424                 'policy/core/browser/url_blacklist_policy_handler_unittest.cc',
425                 'policy/core/common/async_policy_provider_unittest.cc',
426                 'policy/core/common/cloud/cloud_policy_client_unittest.cc',
427                 'policy/core/common/cloud/cloud_policy_core_unittest.cc',
428                 'policy/core/common/cloud/cloud_policy_manager_unittest.cc',
429                 'policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc',
430                 'policy/core/common/cloud/cloud_policy_service_unittest.cc',
431                 'policy/core/common/cloud/cloud_policy_validator_unittest.cc',
432                 'policy/core/common/cloud/component_cloud_policy_service_unittest.cc',
433                 'policy/core/common/cloud/component_cloud_policy_store_unittest.cc',
434                 'policy/core/common/cloud/component_cloud_policy_updater_unittest.cc',
435                 'policy/core/common/cloud/device_management_service_unittest.cc',
436                 'policy/core/common/cloud/external_policy_data_fetcher_unittest.cc',
437                 'policy/core/common/cloud/external_policy_data_updater_unittest.cc',
438                 'policy/core/common/cloud/policy_header_io_helper_unittest.cc',
439                 'policy/core/common/cloud/policy_header_service_unittest.cc',
440                 'policy/core/common/cloud/rate_limiter_unittest.cc',
441                 'policy/core/common/cloud/resource_cache_unittest.cc',
442                 'policy/core/common/cloud/user_cloud_policy_manager_unittest.cc',
443                 'policy/core/common/cloud/user_cloud_policy_store_unittest.cc',
444                 'policy/core/common/cloud/user_info_fetcher_unittest.cc',
445                 'policy/core/common/config_dir_policy_loader_unittest.cc',
446                 'policy/core/common/forwarding_policy_provider_unittest.cc',
447                 'policy/core/common/generate_policy_source_unittest.cc',
448                 'policy/core/common/policy_bundle_unittest.cc',
449                 'policy/core/common/policy_loader_ios_unittest.mm',
450                 'policy/core/common/policy_loader_mac_unittest.cc',
451                 'policy/core/common/policy_loader_win_unittest.cc',
452                 'policy/core/common/policy_map_unittest.cc',
453                 'policy/core/common/policy_provider_android_unittest.cc',
454                 'policy/core/common/policy_service_impl_unittest.cc',
455                 'policy/core/common/policy_statistics_collector_unittest.cc',
456                 'policy/core/common/preg_parser_win_unittest.cc',
457                 'policy/core/common/registry_dict_win_unittest.cc',
458                 'policy/core/common/schema_map_unittest.cc',
459                 'policy/core/common/schema_registry_unittest.cc',
460                 'policy/core/common/schema_unittest.cc',
461               ],
462               'conditions': [
463                 ['OS=="android"', {
464                   'sources/': [
465                     ['exclude', '^policy/core/common/async_policy_provider_unittest\\.cc'],
466                   ],
467                 }],
468                 ['OS=="android" or OS=="ios"', {
469                   # Note: 'sources!' is processed before any 'sources/', so the
470                   # ['include', '^policy/'] on iOS above will include all of the
471                   # policy source files again. Using 'source/' here too will get
472                   # these files excluded as expected.
473                   'sources/': [
474                     ['exclude', '^policy/core/common/cloud/component_cloud_policy_service_unittest\\.cc'],
475                     ['exclude', '^policy/core/common/cloud/component_cloud_policy_store_unittest\\.cc'],
476                     ['exclude', '^policy/core/common/cloud/component_cloud_policy_updater_unittest\\.cc'],
477                     ['exclude', '^policy/core/common/cloud/external_policy_data_fetcher_unittest\\.cc'],
478                     ['exclude', '^policy/core/common/cloud/external_policy_data_updater_unittest\\.cc'],
479                     ['exclude', '^policy/core/common/cloud/resource_cache_unittest\\.cc'],
480                     ['exclude', '^policy/core/common/config_dir_policy_loader_unittest\\.cc'],
481                   ],
482                 }],
483                 ['chromeos==1', {
484                   'sources': [
485                     'policy/core/common/proxy_policy_provider_unittest.cc',
486                   ],
487                   'sources!': [
488                     'policy/core/common/cloud/user_cloud_policy_manager_unittest.cc',
489                     'policy/core/common/cloud/user_cloud_policy_store_unittest.cc',
490                   ],
491                 }],
492                 ['OS=="ios" or OS=="mac"', {
493                   'sources': [
494                     'policy/core/common/mac_util_unittest.cc',
495                   ],
496                 }],
497               ],
498             }],
499           ],
500           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
501           'msvs_disabled_warnings': [4267, ],
502         },
503       ],
504     }],
505     ['OS != "ios" and android_webview_build == 0', {
506       'targets': [
507         {
508           'target_name': 'components_perftests',
509           'type': '<(gtest_target_type)',
510           'dependencies': [
511             '../base/base.gyp:base',
512             '../base/base.gyp:test_support_perf',
513             '../content/content_shell_and_tests.gyp:test_support_content',
514             '../testing/gtest.gyp:gtest',
515             'components.gyp:visitedlink_browser',
516           ],
517          'include_dirs': [
518            '..',
519          ],
520          'sources': [
521            'visitedlink/test/visitedlink_perftest.cc',
522          ],
523          'conditions': [
524            ['OS == "android" and gtest_target_type == "shared_library"', {
525              'dependencies': [
526                '../testing/android/native_test.gyp:native_test_native_code',
527              ],
528            }],
529          ],
530          # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
531          'msvs_disabled_warnings': [ 4267, ],
532         },
533       ],
534       'conditions': [
535         ['OS == "android" and gtest_target_type == "shared_library"', {
536           'targets': [
537             {
538               'target_name': 'components_unittests_apk',
539               'type': 'none',
540               'dependencies': [
541                 'components_unittests',
542               ],
543               'variables': {
544                 'test_suite_name': 'components_unittests',
545                 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)components_unittests<(SHARED_LIB_SUFFIX)',
546               },
547               'includes': [ '../build/apk_test.gypi' ],
548             },
549           ],
550         }],
551       ],
552     }],
553     ['OS!="ios"', {
554       'targets': [
555         {
556           'target_name': 'components_browsertests',
557           'type': '<(gtest_target_type)',
558           'defines!': ['CONTENT_IMPLEMENTATION'],
559           'dependencies': [
560             'components.gyp:autofill_content_browser',
561             'components.gyp:dom_distiller_content',
562             'components.gyp:dom_distiller_core',
563             'components_resources.gyp:components_resources',
564             '../content/content.gyp:content_common',
565             '../content/content.gyp:content_gpu',
566             '../content/content.gyp:content_plugin',
567             '../content/content.gyp:content_renderer',
568             '../content/content_resources.gyp:content_resources',
569             '../content/content_shell_and_tests.gyp:content_browser_test_support',
570             '../content/content_shell_and_tests.gyp:content_shell_lib',
571             '../content/content_shell_and_tests.gyp:content_shell_pak',
572             '../content/content_shell_and_tests.gyp:test_support_content',
573             '../skia/skia.gyp:skia',
574             '../testing/gmock.gyp:gmock',
575             '../testing/gtest.gyp:gtest',
576             '../testing/gmock.gyp:gmock',
577           ],
578           'include_dirs': [
579             '..',
580           ],
581           'defines': [
582             'HAS_OUT_OF_PROC_TEST_RUNNER',
583           ],
584           'sources': [
585             'autofill/content/browser/risk/fingerprint_browsertest.cc',
586             'dom_distiller/content/distiller_page_web_contents_browsertest.cc',
587           ],
588           'actions': [
589             {
590               'action_name': 'repack_components_pack',
591               'variables': {
592                 'pak_inputs': [
593                   '<(SHARED_INTERMEDIATE_DIR)/components/component_resources.pak',
594                   '<(SHARED_INTERMEDIATE_DIR)/components/strings/component_strings_en-US.pak',
595                 ],
596                 'pak_output': '<(PRODUCT_DIR)/components_resources.pak',
597               },
598               'includes': [ '../build/repack_action.gypi' ],
599             },
600           ],
601           'conditions': [
602             ['OS == "android"', {
603               'sources!': [
604                 'autofill/content/browser/risk/fingerprint_browsertest.cc',
605               ],
606             }],
607             ['OS == "linux"', {
608               'sources': [
609                   # content_extractor is a standalone content extraction tool built as
610                   # a MANUAL component_browsertest.
611                   'dom_distiller/standalone/content_extractor.cc',
612                 ],
613             }],
614             ['OS=="win"', {
615               'resource_include_dirs': [
616                 '<(SHARED_INTERMEDIATE_DIR)/webkit',
617               ],
618               'sources': [
619                 '../content/shell/app/resource.h',
620                 '../content/shell/app/shell.rc',
621                 # TODO:  It would be nice to have these pulled in
622                 # automatically from direct_dependent_settings in
623                 # their various targets (net.gyp:net_resources, etc.),
624                 # but that causes errors in other targets when
625                 # resulting .res files get referenced multiple times.
626                 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
627                 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.rc',
628                 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.rc',
629               ],
630               'dependencies': [
631                 '<(DEPTH)/net/net.gyp:net_resources',
632                 '<(DEPTH)/third_party/iaccessible2/iaccessible2.gyp:iaccessible2',
633                 '<(DEPTH)/third_party/isimpledom/isimpledom.gyp:isimpledom',
634                 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
635                 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
636               ],
637               'configurations': {
638                 'Debug_Base': {
639                   'msvs_settings': {
640                     'VCLinkerTool': {
641                       'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
642                     },
643                   },
644                 },
645               },
646               # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
647               'msvs_disabled_warnings': [ 4267, ],
648             }],
649             ['OS=="win" and win_use_allocator_shim==1', {
650               'dependencies': [
651                 '../base/allocator/allocator.gyp:allocator',
652               ],
653             }],
654           ],
655         },
656       ],
657     }],
658   ],