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