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