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