[Android] Ignore exceptions when provision attempts to write local props.
[chromium-blink-merge.git] / components / components_tests.gyp
blob49a32813f60882eabfb6bc80c46e6c74028512bf
1 # Copyright 2014 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             'autocomplete/autocomplete_input_unittest.cc',
22             'autofill/content/browser/content_autofill_driver_unittest.cc',
23             'autofill/content/browser/request_autocomplete_manager_unittest.cc',
24             'autofill/content/browser/wallet/full_wallet_unittest.cc',
25             'autofill/content/browser/wallet/instrument_unittest.cc',
26             'autofill/content/browser/wallet/wallet_address_unittest.cc',
27             'autofill/content/browser/wallet/wallet_client_unittest.cc',
28             'autofill/content/browser/wallet/wallet_items_unittest.cc',
29             'autofill/content/browser/wallet/wallet_service_url_unittest.cc',
30             'autofill/content/browser/wallet/wallet_signin_helper_unittest.cc',
31             'autofill/core/browser/address_field_unittest.cc',
32             'autofill/core/browser/address_unittest.cc',
33             'autofill/core/browser/android/auxiliary_profile_unittest_android.cc',
34             'autofill/core/browser/autocomplete_history_manager_unittest.cc',
35             'autofill/core/browser/autofill_country_unittest.cc',
36             'autofill/core/browser/autofill_data_model_unittest.cc',
37             'autofill/core/browser/autofill_download_unittest.cc',
38             'autofill/core/browser/autofill_external_delegate_unittest.cc',
39             'autofill/core/browser/autofill_field_unittest.cc',
40             'autofill/core/browser/autofill_ie_toolbar_import_win_unittest.cc',
41             'autofill/core/browser/autofill_manager_unittest.cc',
42             'autofill/core/browser/autofill_merge_unittest.cc',
43             'autofill/core/browser/autofill_metrics_unittest.cc',
44             'autofill/core/browser/autofill_profile_unittest.cc',
45             'autofill/core/browser/autofill_regexes_unittest.cc',
46             'autofill/core/browser/autofill_type_unittest.cc',
47             'autofill/core/browser/autofill_xml_parser_unittest.cc',
48             'autofill/core/browser/contact_info_unittest.cc',
49             'autofill/core/browser/credit_card_field_unittest.cc',
50             'autofill/core/browser/credit_card_unittest.cc',
51             'autofill/core/browser/form_field_unittest.cc',
52             'autofill/core/browser/form_structure_unittest.cc',
53             'autofill/core/browser/name_field_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             'bookmarks/browser/bookmark_codec_unittest.cc',
68             'bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc',
69             'bookmarks/browser/bookmark_index_unittest.cc',
70             'bookmarks/browser/bookmark_model_unittest.cc',
71             'bookmarks/browser/bookmark_utils_unittest.cc',
72             'breakpad/app/crash_keys_win_unittest.cc',
73             'captive_portal/captive_portal_detector_unittest.cc',
74             'cloud_devices/common/cloud_devices_urls_unittest.cc',
75             'cloud_devices/common/printer_description_unittest.cc',
76             'data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler_unittest.cc',
77             'data_reduction_proxy/browser/data_reduction_proxy_config_service_unittest.cc',
78             'data_reduction_proxy/browser/data_reduction_proxy_metrics_unittest.cc',
79             'data_reduction_proxy/browser/data_reduction_proxy_params_unittest.cc',
80             'data_reduction_proxy/browser/data_reduction_proxy_protocol_unittest.cc',
81             'data_reduction_proxy/browser/data_reduction_proxy_settings_unittest.cc',
82             'data_reduction_proxy/browser/data_reduction_proxy_usage_stats_unittest.cc',
83             'data_reduction_proxy/common/data_reduction_proxy_headers_unittest.cc',
84             'dom_distiller/core/article_entry_unittest.cc',
85             'dom_distiller/core/distilled_content_store_unittest.cc',
86             'dom_distiller/core/distiller_unittest.cc',
87             'dom_distiller/core/distiller_url_fetcher_unittest.cc',
88             'dom_distiller/core/dom_distiller_model_unittest.cc',
89             'dom_distiller/core/dom_distiller_service_unittest.cc',
90             'dom_distiller/core/dom_distiller_store_unittest.cc',
91             'dom_distiller/core/task_tracker_unittest.cc',
92             'dom_distiller/core/url_utils_unittest.cc',
93             'dom_distiller/core/viewer_unittest.cc',
94             'domain_reliability/config_unittest.cc',
95             'domain_reliability/context_unittest.cc',
96             'domain_reliability/dispatcher_unittest.cc',
97             'domain_reliability/monitor_unittest.cc',
98             'domain_reliability/scheduler_unittest.cc',
99             'domain_reliability/test_util.cc',
100             'domain_reliability/test_util.h',
101             'domain_reliability/uploader_unittest.cc',
102             'domain_reliability/util_unittest.cc',
103             'enhanced_bookmarks/image_store_ios_unittest.mm',
104             'enhanced_bookmarks/image_store_unittest.cc',
105             'enhanced_bookmarks/metadata_accessor_unittest.cc',
106             'feedback/feedback_common_unittest.cc',
107             'feedback/feedback_data_unittest.cc',
108             'feedback/feedback_uploader_unittest.cc',
109             'gcm_driver/gcm_client_impl_unittest.cc',
110             'gcm_driver/gcm_driver_desktop_unittest.cc',
111             'gcm_driver/gcm_stats_recorder_impl_unittest.cc',
112             'history/core/browser/url_database_unittest.cc',
113             'history/core/common/thumbnail_score_unittest.cc',
114             'invalidation/invalidation_logger_unittest.cc',
115             'json_schema/json_schema_validator_unittest.cc',
116             'json_schema/json_schema_validator_unittest_base.cc',
117             'json_schema/json_schema_validator_unittest_base.h',
118             'keyed_service/content/browser_context_dependency_manager_unittest.cc',
119             'keyed_service/core/dependency_graph_unittest.cc',
120             'language_usage_metrics/language_usage_metrics_unittest.cc',
121             'leveldb_proto/proto_database_impl_unittest.cc',
122             'metrics/compression_utils_unittest.cc',
123             'metrics/machine_id_provider_win_unittest.cc',
124             'metrics/metrics_hashes_unittest.cc',
125             'metrics/metrics_log_manager_unittest.cc',
126             'metrics/metrics_log_unittest.cc',
127             'metrics/metrics_reporting_scheduler_unittest.cc',
128             'metrics/metrics_service_unittest.cc',
129             'metrics/metrics_state_manager_unittest.cc',
130             'metrics/persisted_logs_unittest.cc',
131             'navigation_interception/intercept_navigation_resource_throttle_unittest.cc',
132             'network_time/network_time_tracker_unittest.cc',
133             'omaha_query_params/omaha_query_params_unittest.cc',
134             'os_crypt/ie7_password_win_unittest.cc',
135             'os_crypt/keychain_password_mac_unittest.mm',
136             'os_crypt/os_crypt_unittest.cc',
137             'password_manager/core/browser/browser_save_password_progress_logger_unittest.cc',
138             'password_manager/core/browser/log_router_unittest.cc',
139             'password_manager/core/browser/login_database_unittest.cc',
140             'password_manager/core/browser/password_autofill_manager_unittest.cc',
141             'password_manager/core/browser/password_form_manager_unittest.cc',
142             'password_manager/core/browser/password_generation_manager_unittest.cc',
143             'password_manager/core/browser/password_manager_unittest.cc',
144             'password_manager/core/browser/password_store_default_unittest.cc',
145             'password_manager/core/browser/password_store_unittest.cc',
146             'password_manager/core/browser/password_syncable_service_unittest.cc',
147             'password_manager/core/browser/psl_matching_helper_unittest.cc',
148             'precache/content/precache_manager_unittest.cc',
149             'precache/core/precache_database_unittest.cc',
150             'precache/core/precache_fetcher_unittest.cc',
151             'precache/core/precache_url_table_unittest.cc',
152             'query_parser/query_parser_unittest.cc',
153             'query_parser/snippet_unittest.cc',
154             'rappor/bloom_filter_unittest.cc',
155             'rappor/byte_vector_utils_unittest.cc',
156             'rappor/log_uploader_unittest.cc',
157             'rappor/rappor_metric_unittest.cc',
158             'rappor/rappor_service_unittest.cc',
159             'search_provider_logos/logo_cache_unittest.cc',
160             'search_provider_logos/logo_tracker_unittest.cc',
161             'sessions/serialized_navigation_entry_unittest.cc',
162             'signin/core/browser/mutable_profile_oauth2_token_service_unittest.cc',
163             'signin/core/browser/signin_error_controller_unittest.cc',
164             'signin/core/browser/webdata/token_service_table_unittest.cc',
165             'signin/ios/browser/profile_oauth2_token_service_ios_unittest.mm',
166             'storage_monitor/image_capture_device_manager_unittest.mm',
167             'storage_monitor/media_storage_util_unittest.cc',
168             'storage_monitor/media_transfer_protocol_device_observer_linux_unittest.cc',
169             'storage_monitor/storage_info_unittest.cc',
170             'storage_monitor/storage_monitor_chromeos_unittest.cc',
171             'storage_monitor/storage_monitor_linux_unittest.cc',
172             'storage_monitor/storage_monitor_mac_unittest.mm',
173             'storage_monitor/storage_monitor_unittest.cc',
174             'storage_monitor/storage_monitor_win_unittest.cc',
175             'sync_driver/non_ui_data_type_controller_unittest.cc',
176             'sync_driver/data_type_manager_impl_unittest.cc',
177             'sync_driver/generic_change_processor_unittest.cc',
178             'sync_driver/model_association_manager_unittest.cc',
179             'sync_driver/non_blocking_data_type_controller_unittest.cc',
180             'sync_driver/shared_change_processor_unittest.cc',
181             'sync_driver/sync_prefs_unittest.cc',
182             'sync_driver/system_encryptor_unittest.cc',
183             'sync_driver/ui_data_type_controller_unittest.cc',
184             'test/run_all_unittests.cc',
185             'translate/core/browser/language_state_unittest.cc',
186             'translate/core/browser/translate_browser_metrics_unittest.cc',
187             'translate/core/browser/translate_prefs_unittest.cc',
188             'translate/core/browser/translate_script_unittest.cc',
189             'translate/core/common/translate_metrics_unittest.cc',
190             'translate/core/common/translate_util_unittest.cc',
191             'translate/core/language_detection/language_detection_util_unittest.cc',
192             'url_matcher/regex_set_matcher_unittest.cc',
193             'url_matcher/string_pattern_unittest.cc',
194             'url_matcher/substring_set_matcher_unittest.cc',
195             'url_matcher/url_matcher_factory_unittest.cc',
196             'url_matcher/url_matcher_unittest.cc',
197             'url_fixer/url_fixer_unittest.cc',
198             'variations/active_field_trials_unittest.cc',
199             'variations/caching_permuted_entropy_provider_unittest.cc',
200             'variations/entropy_provider_unittest.cc',
201             'variations/metrics_util_unittest.cc',
202             'variations/study_filtering_unittest.cc',
203             'variations/variations_associated_data_unittest.cc',
204             'variations/variations_seed_processor_unittest.cc',
205             'variations/variations_seed_simulator_unittest.cc',
206             'visitedlink/test/visitedlink_unittest.cc',
207             'web_modal/web_contents_modal_dialog_manager_unittest.cc',
208           ],
209           'include_dirs': [
210             '..',
211           ],
212           'dependencies': [
213             '../base/base.gyp:base_prefs_test_support',
214             '../base/base.gyp:test_support_base',
215             # TODO(blundell): Eliminate this dependency by having
216             # components_unittests have its own pakfile. crbug.com/348563
217             '../chrome/chrome_resources.gyp:packed_extra_resources',
218             # TODO(blundell): Eliminate the need for this dependency in code
219             # that iOS shares. crbug.com/325243
220             '../content/content_shell_and_tests.gyp:test_support_content',
221             '../sync/sync.gyp:sync',
222             '../sync/sync.gyp:test_support_sync_api',
223             '../testing/gmock.gyp:gmock',
224             '../testing/gtest.gyp:gtest',
225             '../ui/base/ui_base.gyp:ui_base',
226             '../ui/gfx/gfx.gyp:gfx',
228             'components_resources.gyp:components_resources',
230             # Dependencies of auto_login_parser
231             'components.gyp:auto_login_parser',
233             # Dependencies of autocomplete
234             'components.gyp:autocomplete',
235             'components.gyp:autocomplete_test_support',
237             # Dependencies of autofill
238             'components.gyp:autofill_core_browser',
239             'components.gyp:autofill_core_common',
240             'components.gyp:autofill_core_test_support',
241             'components_strings.gyp:components_strings',
242             '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber',
244             # Dependencies of breakpad
245             'components.gyp:breakpad_test_support',
247             # Dependencies of bookmarks
248             'components.gyp:bookmarks_browser',
249             'components.gyp:bookmarks_test_support',
251             # Dependencies of captive_portal
252             'components.gyp:captive_portal_test_support',
253             '../net/net.gyp:net_test_support',
255             # Dependencies of cloud_devices
256             'components.gyp:cloud_devices_common',
258             # Dependencies of data_reduction_proxy
259             'components.gyp:data_reduction_proxy_browser',
260             'components.gyp:data_reduction_proxy_common',
261             'components.gyp:data_reduction_proxy_test_support',
263             # Dependencies of dom_distiller
264             'components.gyp:distilled_page_proto',
265             'components.gyp:dom_distiller_core',
266             'components.gyp:dom_distiller_test_support',
268             # Dependencies of domain_reliability
269             'components.gyp:domain_reliability',
271             # Dependencies of enhanced_bookmarks
272             'components.gyp:enhanced_bookmarks',
273             'components.gyp:enhanced_bookmarks_test_support',
275             # Dependencies of feedback
276             'components.gyp:feedback_component',
278             # Dependencies of gcm
279             'components.gyp:gcm_driver',
280             'components.gyp:gcm_driver_test_support',
282             # Dependencies of history
283             'components.gyp:history_core_browser',
284             'components.gyp:history_core_common',
286             # Dependencies of invalidation
287             'components.gyp:invalidation',
288             'components.gyp:invalidation_test_support',
290             # Dependencies of json_schema
291             'components.gyp:json_schema',
293             # Dependencies of keyed_service
294             'components.gyp:keyed_service_core',
296             # Dependencies of language_usage_metrics
297             'components.gyp:language_usage_metrics',
299             # Dependencies of leveldb_proto
300             '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
301             'components.gyp:leveldb_proto',
302             'components.gyp:leveldb_proto_test_support',
304             # Dependencies of metrics
305             'components.gyp:metrics',
306             'components.gyp:metrics_net',
307             'components.gyp:metrics_test_support',
309             # Dependencies of network_time
310             'components.gyp:network_time',
312             # Dependencies of omaha_query_params
313             'components.gyp:omaha_query_params',
315             # Dependencies of os_crypt
316             'components.gyp:os_crypt',
318             # Dependencies of password_manager
319             'components.gyp:password_manager_core_browser',
320             'components.gyp:password_manager_core_browser_test_support',
322             # Dependencies of precache/core
323             'components.gyp:password_manager_core_browser',
324             'components.gyp:precache_core',
326             # Dependencies of pref_registry
327             'components.gyp:pref_registry_test_support',
329             # Dependencies of query_parser
330             'components.gyp:query_parser',
332             # Dependencies of rappor
333             'components.gyp:rappor',
335             # Dependencies of search_provider_logos
336             'components.gyp:search_provider_logos',
338             # Dependencies of signin
339             'components.gyp:signin_core_browser',
340             'components.gyp:signin_core_browser_test_support',
341             '../google_apis/google_apis.gyp:google_apis_test_support',
343             # Dependencies of sync_driver
344             'components.gyp:sync_driver_test_support',
346             # Dependencies of translate.
347             'components.gyp:translate_core_browser',
348             'components.gyp:translate_core_common',
349             'components.gyp:translate_core_language_detection',
351             # Dependencies of url_fixer
352             'components.gyp:url_fixer',
353             '../url/url.gyp:url_lib',
355             # Dependencies of variations
356             'components.gyp:variations',
357           ],
358           'conditions': [
359             ['toolkit_views == 1', {
360               'sources': [
361                 'bookmarks/browser/bookmark_node_data_unittest.cc',
362               ],
363             }],
364             ['OS != "ios"', {
365               'sources': [
366                 'autofill/content/renderer/renderer_save_password_progress_logger_unittest.cc',
367                 'dom_distiller/content/dom_distiller_viewer_source_unittest.cc',
368                 'usb_service/usb_context_unittest.cc',
369               ],
370               'dependencies': [
371                 # Dependencies of autofill
372                 'components.gyp:autofill_content_browser',
373                 'components.gyp:autofill_content_renderer',
374                 'components.gyp:autofill_content_test_support',
376                 # Dependencies of dom_distiller
377                 'components.gyp:dom_distiller_content',
379                 # Dependencies of
380                 # intercept_navigation_resource_throttle_unittest.cc
381                 '../skia/skia.gyp:skia',
382                 'components.gyp:navigation_interception',
384                 # Dependencies of keyed_service
385                 'components.gyp:keyed_service_content',
387                 # Dependencies of precache/content
388                 'components.gyp:precache_content',
390                 # Dependencies of sessions
391                 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
392                 'components.gyp:sessions',
393                 'components.gyp:sessions_test_support',
395                 # Dependencies of storage monitor
396                 'components.gyp:storage_monitor',
397                 'components.gyp:storage_monitor_test_support',
399                 # Dependencies of url_matcher.
400                 'components.gyp:url_matcher',
402                 # Dependencies of usb_service tests.
403                 'components.gyp:usb_service',
404                 '../third_party/libusb/libusb.gyp:libusb',
406                 # Dependencies of visitedlink
407                 'components.gyp:visitedlink_browser',
408                 'components.gyp:visitedlink_renderer',
409                 '../content/content_resources.gyp:content_resources',
411                 # Dependencies of web_modal
412                 'components.gyp:web_modal',
413                 'components.gyp:web_modal_test_support',
414               ],
415             }, { # 'OS == "ios"'
416               'includes': ['../chrome/chrome_ios_bundle_resources.gypi'],
417               'sources/': [
418                 ['exclude', '\\.cc$'],
419                 ['exclude', '\\.mm$'],
420                 ['include', '^test/run_all_unittests\\.cc$'],
421                 ['include', '^auto_login_parser/'],
422                 ['include', '^autofill/core/'],
423                 ['include', '^bookmarks/'],
424                 ['include', '^data_reduction_proxy/'],
425                 ['include', '^dom_distiller/'],
426                 ['include', '^enhanced_bookmarks/'],
427                 ['include', '^gcm_driver/'],
428                 ['include', '^history/'],
429                 ['include', '^invalidation/'],
430                 ['include', '^json_schema/'],
431                 ['include', '^keyed_service/core/'],
432                 ['include', '^language_usage_metrics/'],
433                 ['include', '^leveldb_proto/'],
434                 ['include', '^metrics/'],
435                 ['include', '^network_time/'],
436                 ['include', '^password_manager/'],
437                 ['include', '^precache/core/'],
438                 ['include', '^search_provider_logos/'],
439                 ['include', '^signin/'],
440                 ['include', '^sync_driver/'],
441                 ['include', '^translate/'],
442                 ['include', '^url_fixer/'],
443                 ['include', '^variations/'],
444               ],
445               'dependencies': [
446                 # Dependencies of signin
447                 'components.gyp:signin_ios_browser',
448                 '../ios/ios_tests.gyp:test_support_ios',
449               ],
450               'actions': [
451                 {
452                   'action_name': 'copy_test_data',
453                   'variables': {
454                     'test_data_files': [
455                       'test/data',
456                     ],
457                     'test_data_prefix': 'components',
458                   },
459                   'includes': [ '../build/copy_test_data_ios.gypi' ],
460                 },
461               ],
462               'conditions': [
463                 ['configuration_policy==1', {
464                   'sources/': [
465                     ['include', '^policy/'],
466                   ],
467                 }],
468               ],
469             }],
470             ['disable_nacl==0', {
471               'sources': [
472                 'nacl/browser/nacl_file_host_unittest.cc',
473                 'nacl/browser/nacl_process_host_unittest.cc',
474                 'nacl/browser/nacl_validation_cache_unittest.cc',
475                 'nacl/browser/pnacl_host_unittest.cc',
476                 'nacl/browser/pnacl_translation_cache_unittest.cc',
477                 'nacl/browser/test_nacl_browser_delegate.cc',
478                 'nacl/zygote/nacl_fork_delegate_linux_unittest.cc',
479               ],
480               'dependencies': [
481                 'nacl.gyp:nacl_browser',
482                 'nacl.gyp:nacl_common',
483               ],
484             }],
485             ['OS == "mac"', {
486               'link_settings': {
487                 'libraries': [
488                   '$(SDKROOT)/System/Library/Frameworks/AddressBook.framework',
489                   '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
490                   '$(SDKROOT)/System/Library/Frameworks/ImageCaptureCore.framework',
491                 ],
492               },
493               'sources!': [
494                 'password_manager/core/browser/password_store_default_unittest.cc',
495               ],
496             }],
497             ['OS == "android"', {
498               'sources!': [
499                 'gcm_driver/gcm_client_impl_unittest.cc',
500                 'gcm_driver/gcm_driver_desktop_unittest.cc',
501                 'feedback/feedback_common_unittest.cc',
502                 'feedback/feedback_data_unittest.cc',
503                 'feedback/feedback_uploader_unittest.cc',
504                 'gcm_driver/gcm_stats_recorder_impl_unittest.cc',
505                 'signin/core/browser/mutable_profile_oauth2_token_service_unittest.cc',
506                 'storage_monitor/media_storage_util_unittest.cc',
507                 'storage_monitor/storage_info_unittest.cc',
508                 'storage_monitor/storage_monitor_unittest.cc',
509                 'usb_service/usb_context_unittest.cc',
510                 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
511               ],
512               'dependencies': [
513                 '../testing/android/native_test.gyp:native_test_native_code',
514               ],
515               'dependencies!': [
516                 'components.gyp:feedback_component',
517                 'components.gyp:storage_monitor',
518                 'components.gyp:storage_monitor_test_support',
519                 'components.gyp:usb_service',
520                 'components.gyp:web_modal',
521                 'components.gyp:web_modal_test_support',
522                 '../third_party/libusb/libusb.gyp:libusb',
523               ],
524             }],
525             ['OS != "android"', {
526               'sources': [
527                 'invalidation/fake_invalidator_unittest.cc',
528                 'invalidation/gcm_network_channel_unittest.cc',
529                 'invalidation/invalidation_notifier_unittest.cc',
530                 'invalidation/invalidator_registrar_unittest.cc',
531                 'invalidation/non_blocking_invalidator_unittest.cc',
532                 'invalidation/p2p_invalidator_unittest.cc',
533                 'invalidation/push_client_channel_unittest.cc',
534                 'invalidation/sync_invalidation_listener_unittest.cc',
535                 'invalidation/sync_system_resources_unittest.cc',
536                 'invalidation/ticl_invalidation_service_unittest.cc',
537               ],
538             }],
539             ['chromeos==1', {
540               'sources': [
541                 'metrics/chromeos/serialization_utils_unittest.cc',
542               ],
543               'sources!': [
544                 'storage_monitor/storage_monitor_linux_unittest.cc',
545               ],
546               'dependencies': [
547                 '../chromeos/chromeos.gyp:chromeos_test_support',
548                 'components.gyp:metrics_chromeos',
549               ],
550             }],
551             ['OS=="linux"', {
552               'dependencies': [
553                 '../dbus/dbus.gyp:dbus',
554                 '../device/media_transfer_protocol/media_transfer_protocol.gyp:device_media_transfer_protocol',
555               ],
556             }],
557             ['OS=="linux" and use_udev==0', {
558               'dependencies!': [
559                 '../third_party/libusb/libusb.gyp:libusb',
560                 'components.gyp:storage_monitor',
561                 'components.gyp:storage_monitor_test_support',
562               ],
563               'sources/': [
564                 ['exclude', '^storage_monitor/'],
565                 ['exclude', '^usb_service/'],
566               ],
567             }],
568             ['OS=="win" and win_use_allocator_shim==1', {
569               'dependencies': [
570                 '../base/allocator/allocator.gyp:allocator',
571               ],
572             }],
573             ['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
574             'dependencies': [
575                 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
576             ],
577             'link_settings': {
578                 'ldflags': ['-rdynamic'],
579             },
580             }],
581             ['configuration_policy==1', {
582               'dependencies': [
583                 'components.gyp:policy_component',
584                 'components.gyp:policy_component_test_support',
585                 'components.gyp:policy_test_support',
586               ],
587               'sources': [
588                 'policy/core/browser/autofill_policy_handler_unittest.cc',
589                 'policy/core/browser/browser_policy_connector_unittest.cc',
590                 'policy/core/browser/configuration_policy_handler_unittest.cc',
591                 'policy/core/browser/configuration_policy_pref_store_unittest.cc',
592                 'policy/core/browser/managed_bookmarks_tracker_unittest.cc',
593                 'policy/core/browser/url_blacklist_policy_handler_unittest.cc',
594                 'policy/core/common/async_policy_provider_unittest.cc',
595                 'policy/core/common/cloud/cloud_policy_client_unittest.cc',
596                 'policy/core/common/cloud/cloud_policy_core_unittest.cc',
597                 'policy/core/common/cloud/cloud_policy_manager_unittest.cc',
598                 'policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc',
599                 'policy/core/common/cloud/cloud_policy_service_unittest.cc',
600                 'policy/core/common/cloud/cloud_policy_validator_unittest.cc',
601                 'policy/core/common/cloud/component_cloud_policy_service_unittest.cc',
602                 'policy/core/common/cloud/component_cloud_policy_store_unittest.cc',
603                 'policy/core/common/cloud/component_cloud_policy_updater_unittest.cc',
604                 'policy/core/common/cloud/device_management_service_unittest.cc',
605                 'policy/core/common/cloud/external_policy_data_fetcher_unittest.cc',
606                 'policy/core/common/cloud/external_policy_data_updater_unittest.cc',
607                 'policy/core/common/cloud/policy_header_io_helper_unittest.cc',
608                 'policy/core/common/cloud/policy_header_service_unittest.cc',
609                 'policy/core/common/cloud/rate_limiter_unittest.cc',
610                 'policy/core/common/cloud/resource_cache_unittest.cc',
611                 'policy/core/common/cloud/user_cloud_policy_manager_unittest.cc',
612                 'policy/core/common/cloud/user_cloud_policy_store_unittest.cc',
613                 'policy/core/common/cloud/user_info_fetcher_unittest.cc',
614                 'policy/core/common/config_dir_policy_loader_unittest.cc',
615                 'policy/core/common/forwarding_policy_provider_unittest.cc',
616                 'policy/core/common/generate_policy_source_unittest.cc',
617                 'policy/core/common/policy_bundle_unittest.cc',
618                 'policy/core/common/policy_loader_ios_unittest.mm',
619                 'policy/core/common/policy_loader_mac_unittest.cc',
620                 'policy/core/common/policy_loader_win_unittest.cc',
621                 'policy/core/common/policy_map_unittest.cc',
622                 'policy/core/common/policy_provider_android_unittest.cc',
623                 'policy/core/common/policy_service_impl_unittest.cc',
624                 'policy/core/common/policy_statistics_collector_unittest.cc',
625                 'policy/core/common/preg_parser_win_unittest.cc',
626                 'policy/core/common/registry_dict_win_unittest.cc',
627                 'policy/core/common/schema_map_unittest.cc',
628                 'policy/core/common/schema_registry_unittest.cc',
629                 'policy/core/common/schema_unittest.cc',
630               ],
631               'conditions': [
632                 ['OS=="android"', {
633                   'sources/': [
634                     ['exclude', '^policy/core/common/async_policy_provider_unittest\\.cc'],
635                   ],
636                 }],
637                 ['OS=="android" or OS=="ios"', {
638                   # Note: 'sources!' is processed before any 'sources/', so the
639                   # ['include', '^policy/'] on iOS above will include all of the
640                   # policy source files again. Using 'source/' here too will get
641                   # these files excluded as expected.
642                   'sources/': [
643                     ['exclude', '^policy/core/common/cloud/component_cloud_policy_service_unittest\\.cc'],
644                     ['exclude', '^policy/core/common/cloud/component_cloud_policy_store_unittest\\.cc'],
645                     ['exclude', '^policy/core/common/cloud/component_cloud_policy_updater_unittest\\.cc'],
646                     ['exclude', '^policy/core/common/cloud/external_policy_data_fetcher_unittest\\.cc'],
647                     ['exclude', '^policy/core/common/cloud/external_policy_data_updater_unittest\\.cc'],
648                     ['exclude', '^policy/core/common/cloud/resource_cache_unittest\\.cc'],
649                     ['exclude', '^policy/core/common/config_dir_policy_loader_unittest\\.cc'],
650                   ],
651                 }],
652                 ['chromeos==1', {
653                   'sources': [
654                     'policy/core/common/proxy_policy_provider_unittest.cc',
655                   ],
656                   'sources!': [
657                     'policy/core/common/cloud/user_cloud_policy_manager_unittest.cc',
658                     'policy/core/common/cloud/user_cloud_policy_store_unittest.cc',
659                   ],
660                 }],
661                 ['OS=="ios" or OS=="mac"', {
662                   'sources': [
663                     'policy/core/common/mac_util_unittest.cc',
664                   ],
665                 }],
666               ],
667             }],
668           ],
669           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
670           'msvs_disabled_warnings': [4267, ],
671         },
672       ],
673     }],
674     ['OS != "ios" and android_webview_build == 0', {
675       'targets': [
676         {
677           'target_name': 'components_perftests',
678           'type': '<(gtest_target_type)',
679           'dependencies': [
680             '../base/base.gyp:base',
681             '../base/base.gyp:test_support_perf',
682             '../content/content_shell_and_tests.gyp:test_support_content',
683             '../testing/gtest.gyp:gtest',
684             'components.gyp:visitedlink_browser',
685           ],
686          'include_dirs': [
687            '..',
688          ],
689          'sources': [
690            'visitedlink/test/visitedlink_perftest.cc',
691          ],
692          'conditions': [
693            ['OS == "android"', {
694              'dependencies': [
695                '../testing/android/native_test.gyp:native_test_native_code',
696              ],
697            }],
698          ],
699          # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
700          'msvs_disabled_warnings': [ 4267, ],
701         },
702       ],
703       'conditions': [
704         ['OS == "android"', {
705           'targets': [
706             {
707               'target_name': 'components_unittests_apk',
708               'type': 'none',
709               'dependencies': [
710                 'components_unittests',
711               ],
712               'variables': {
713                 'test_suite_name': 'components_unittests',
714               },
715               'includes': [ '../build/apk_test.gypi' ],
716             },
717           ],
718         }],
719       ],
720     }],
721     ['OS!="ios"', {
722       'targets': [
723         {
724           'target_name': 'components_browsertests',
725           'type': '<(gtest_target_type)',
726           'defines!': ['CONTENT_IMPLEMENTATION'],
727           'dependencies': [
728             'components.gyp:autofill_content_browser',
729             'components.gyp:dom_distiller_content',
730             'components.gyp:dom_distiller_core',
731             'components_resources.gyp:components_resources',
732             '../content/content.gyp:content_common',
733             '../content/content.gyp:content_gpu',
734             '../content/content.gyp:content_plugin',
735             '../content/content.gyp:content_renderer',
736             '../content/content_resources.gyp:content_resources',
737             '../content/content_shell_and_tests.gyp:content_browser_test_support',
738             '../content/content_shell_and_tests.gyp:content_shell_lib',
739             '../content/content_shell_and_tests.gyp:content_shell_pak',
740             '../content/content_shell_and_tests.gyp:test_support_content',
741             '../skia/skia.gyp:skia',
742             '../testing/gmock.gyp:gmock',
743             '../testing/gtest.gyp:gtest',
744           ],
745           'include_dirs': [
746             '..',
747           ],
748           'defines': [
749             'HAS_OUT_OF_PROC_TEST_RUNNER',
750           ],
751           'sources': [
752             'autofill/content/browser/risk/fingerprint_browsertest.cc',
753             'dom_distiller/content/distiller_page_web_contents_browsertest.cc',
754           ],
755           'actions': [
756             {
757               'action_name': 'repack_components_pack',
758               'variables': {
759                 'pak_inputs': [
760                   '<(SHARED_INTERMEDIATE_DIR)/components/component_resources.pak',
761                   '<(SHARED_INTERMEDIATE_DIR)/components/strings/components_strings_en-US.pak',
762                 ],
763                 'pak_output': '<(PRODUCT_DIR)/components_resources.pak',
764               },
765               'includes': [ '../build/repack_action.gypi' ],
766             },
767           ],
768           'conditions': [
769             ['OS == "android"', {
770               'sources!': [
771                 'autofill/content/browser/risk/fingerprint_browsertest.cc',
772               ],
773             }],
774             ['OS == "linux"', {
775               'sources': [
776                   # content_extractor is a standalone content extraction tool built as
777                   # a MANUAL component_browsertest.
778                   'dom_distiller/standalone/content_extractor.cc',
779                 ],
780             }],
781             ['OS=="win"', {
782               'resource_include_dirs': [
783                 '<(SHARED_INTERMEDIATE_DIR)/webkit',
784               ],
785               'sources': [
786                 '../content/shell/app/resource.h',
787                 '../content/shell/app/shell.rc',
788                 # TODO:  It would be nice to have these pulled in
789                 # automatically from direct_dependent_settings in
790                 # their various targets (net.gyp:net_resources, etc.),
791                 # but that causes errors in other targets when
792                 # resulting .res files get referenced multiple times.
793                 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
794                 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.rc',
795                 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.rc',
796               ],
797               'dependencies': [
798                 '<(DEPTH)/net/net.gyp:net_resources',
799                 '<(DEPTH)/third_party/iaccessible2/iaccessible2.gyp:iaccessible2',
800                 '<(DEPTH)/third_party/isimpledom/isimpledom.gyp:isimpledom',
801                 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
802                 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
803               ],
804               'configurations': {
805                 'Debug_Base': {
806                   'msvs_settings': {
807                     'VCLinkerTool': {
808                       'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
809                     },
810                   },
811                 },
812               },
813               # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
814               'msvs_disabled_warnings': [ 4267, ],
815             }],
816             ['OS=="win" and win_use_allocator_shim==1', {
817               'dependencies': [
818                 '../base/allocator/allocator.gyp:allocator',
819               ],
820             }],
821           ],
822         },
823       ],
824     }],
825   ],