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