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