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.
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).
13 ['android_webview_build == 0', {
16 'target_name': 'components_unittests',
17 'type': '<(gtest_target_type)',
19 'auto_login_parser/auto_login_parser_unittest.cc',
20 'autofill/core/browser/webdata/autofill_entry_unittest.cc',
21 'autofill/core/browser/webdata/web_data_service_unittest.cc',
22 'autofill/core/common/form_data_unittest.cc',
23 'autofill/core/common/form_field_data_unittest.cc',
24 'autofill/core/common/password_form_fill_data_unittest.cc',
25 'browser_context_keyed_service/browser_context_dependency_manager_unittest.cc',
26 'browser_context_keyed_service/dependency_graph_unittest.cc',
27 'cloud_devices/printer_description_unittest.cc',
28 'dom_distiller/core/article_entry_unittest.cc',
29 'dom_distiller/core/distiller_unittest.cc',
30 'dom_distiller/core/distiller_url_fetcher_unittest.cc',
31 'dom_distiller/core/dom_distiller_database_unittest.cc',
32 'dom_distiller/core/dom_distiller_model_unittest.cc',
33 'dom_distiller/core/dom_distiller_service_unittest.cc',
34 'dom_distiller/core/dom_distiller_store_unittest.cc',
35 'dom_distiller/core/task_tracker_unittest.cc',
36 'json_schema/json_schema_validator_unittest.cc',
37 'json_schema/json_schema_validator_unittest_base.cc',
38 'json_schema/json_schema_validator_unittest_base.h',
39 'language_usage_metrics/language_usage_metrics_unittest.cc',
40 'metrics/metrics_hashes_unittest.cc',
41 'navigation_interception/intercept_navigation_resource_throttle_unittest.cc',
42 'password_manager/core/browser/login_database_unittest.cc',
43 'password_manager/core/browser/psl_matching_helper_unittest.cc',
44 'password_manager/core/browser/password_store_default_unittest.cc',
45 'password_manager/core/browser/password_store_unittest.cc',
46 'password_manager/core/browser/password_syncable_service_unittest.cc',
47 'precache/content/precache_manager_unittest.cc',
48 'precache/core/precache_database_unittest.cc',
49 'precache/core/precache_fetcher_unittest.cc',
50 'precache/core/precache_url_table_unittest.cc',
51 'rappor/bloom_filter_unittest.cc',
52 'rappor/byte_vector_utils_unittest.cc',
53 'rappor/log_uploader_unittest.cc',
54 'rappor/rappor_metric_unittest.cc',
55 'rappor/rappor_service_unittest.cc',
56 'sessions/serialized_navigation_entry_unittest.cc',
57 'signin/core/webdata/token_service_table_unittest.cc',
58 'storage_monitor/image_capture_device_manager_unittest.mm',
59 'storage_monitor/media_storage_util_unittest.cc',
60 'storage_monitor/media_transfer_protocol_device_observer_linux_unittest.cc',
61 'storage_monitor/storage_info_unittest.cc',
62 'storage_monitor/storage_monitor_chromeos_unittest.cc',
63 'storage_monitor/storage_monitor_linux_unittest.cc',
64 'storage_monitor/storage_monitor_mac_unittest.mm',
65 'storage_monitor/storage_monitor_unittest.cc',
66 'storage_monitor/storage_monitor_win_unittest.cc',
67 'sync_driver/model_association_manager_unittest.cc',
68 'sync_driver/system_encryptor_unittest.cc',
69 'test/run_all_unittests.cc',
70 'translate/core/browser/language_state_unittest.cc',
71 'translate/core/browser/translate_browser_metrics_unittest.cc',
72 'translate/core/browser/translate_prefs_unittest.cc',
73 'translate/core/browser/translate_script_unittest.cc',
74 'translate/core/common/translate_metrics_unittest.cc',
75 'translate/core/common/translate_util_unittest.cc',
76 'translate/language_detection/language_detection_util_unittest.cc',
77 'url_matcher/regex_set_matcher_unittest.cc',
78 'url_matcher/string_pattern_unittest.cc',
79 'url_matcher/substring_set_matcher_unittest.cc',
80 'url_matcher/url_matcher_factory_unittest.cc',
81 'url_matcher/url_matcher_unittest.cc',
82 # TODO(asvitkine): These should be tested on iOS too.
83 'variations/entropy_provider_unittest.cc',
84 'variations/metrics_util_unittest.cc',
85 'variations/variations_associated_data_unittest.cc',
86 'variations/variations_seed_processor_unittest.cc',
87 'variations/variations_seed_simulator_unittest.cc',
88 'visitedlink/test/visitedlink_unittest.cc',
89 'encryptor/encryptor_password_mac_unittest.cc',
90 'encryptor/encryptor_unittest.cc',
91 'encryptor/ie7_password_unittest_win.cc',
92 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
98 '../base/base.gyp:base_prefs_test_support',
99 '../base/base.gyp:test_support_base',
100 # TODO(blundell): Eliminate the need for this dependency in code
101 # that iOS shares. crbug.com/325243
102 '../content/content_shell_and_tests.gyp:test_support_content',
103 '../sync/sync.gyp:sync',
104 '../testing/gmock.gyp:gmock',
105 '../testing/gtest.gyp:gtest',
106 '../ui/gfx/gfx.gyp:gfx',
109 # Dependencies of auto_login_parser
110 'components.gyp:auto_login_parser',
112 # Dependencies of autofill
113 'components.gyp:autofill_core_browser',
114 'components.gyp:autofill_core_common',
115 'components.gyp:autofill_core_test_support',
117 # Dependencies of cloud_devices
118 'components.gyp:cloud_devices',
120 # Dependencies of dom_distiller
121 'components.gyp:distilled_page_proto',
122 'components.gyp:dom_distiller_core',
123 'components.gyp:dom_distiller_test_support',
125 # Dependencies of encryptor
126 'components.gyp:encryptor',
128 # Dependencies of json_schema
129 'components.gyp:json_schema',
131 # Dependencies of language_usage_metrics
132 'components.gyp:language_usage_metrics',
134 # Dependencies of password_manager
135 'components.gyp:password_manager_core_browser',
136 'components.gyp:password_manager_core_browser_test_support',
138 # Dependencies of precache/core
139 'components.gyp:password_manager_core_browser',
140 'components.gyp:precache_core',
142 # Dependencies of rappor
143 'components.gyp:rappor',
145 # Dependencies of signin
146 'components.gyp:signin_core',
148 # Dependencies of sync_driver
149 'components.gyp:sync_driver_test_support',
151 # Dependencies of translate.
152 'components.gyp:translate_core_browser',
153 'components.gyp:translate_core_common',
154 'components.gyp:translate_language_detection',
156 # Dependencies of variations
157 'components.gyp:variations',
162 # Dependencies of browser_context_keyed_service
163 'components.gyp:browser_context_keyed_service',
166 # intercept_navigation_resource_throttle_unittest.cc
167 '../skia/skia.gyp:skia',
168 'components.gyp:navigation_interception',
170 # Dependencies of precache/content
171 'components.gyp:precache_content',
173 # Dependencies of sessions
174 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
175 'components.gyp:sessions',
176 'components.gyp:sessions_test_support',
178 # Dependencies of storage monitor
179 'components.gyp:storage_monitor',
180 'components.gyp:storage_monitor_test_support',
182 # Dependencies of url_matcher.
183 'components.gyp:url_matcher',
185 # Dependencies of visitedlink
186 'components.gyp:visitedlink_browser',
187 'components.gyp:visitedlink_renderer',
188 '../content/content_resources.gyp:content_resources',
190 # Dependencies of web_modal
191 'components.gyp:web_modal',
192 'components.gyp:web_modal_test_support',
196 ['exclude', '\\.cc$'],
197 ['exclude', '\\.mm$'],
198 ['include', '^test/run_all_unittests\\.cc$'],
199 # TODO(ios): Include files here as they are made to work, see
200 # http://crbug.com/303011.
201 # TODO(asvitkine): Bring up variations/ unittests on iOS.
202 # TODO(blundell): Bring up json_schema/ unittests on iOS.
203 ['include', '^auto_login_parser/'],
204 ['include', '^autofill/'],
205 ['include', '^dom_distiller/'],
206 ['include', '^language_usage_metrics/'],
207 ['include', '^password_manager/'],
208 ['include', '^precache/core/'],
209 ['include', '^signin/'],
210 ['include', '^sync_driver/'],
211 ['include', '^translate/'],
212 # TODO(blundell): Provide the iOS login DB implementation and
213 # then re-enable this test. http://crbug.com/341429
214 ['exclude', '^password_manager/core/browser/login_database_unittest.cc'],
217 ['configuration_policy==1', {
219 ['include', '^policy/'],
224 ['disable_nacl==0', {
226 'nacl/browser/nacl_file_host_unittest.cc',
227 'nacl/browser/nacl_process_host_unittest.cc',
228 'nacl/browser/nacl_validation_cache_unittest.cc',
229 'nacl/browser/pnacl_host_unittest.cc',
230 'nacl/browser/pnacl_translation_cache_unittest.cc',
231 'nacl/browser/test_nacl_browser_delegate.cc',
234 'nacl.gyp:nacl_browser',
235 'nacl.gyp:nacl_common',
241 '$(SDKROOT)/System/Library/Frameworks/AddressBook.framework',
242 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
243 '$(SDKROOT)/System/Library/Frameworks/ImageCaptureCore.framework',
247 'password_manager/core/browser/password_store_default_unittest.cc',
250 ['OS == "android"', {
252 'storage_monitor/media_storage_util_unittest.cc',
253 'storage_monitor/storage_info_unittest.cc',
254 'storage_monitor/storage_monitor_unittest.cc',
255 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
258 'components.gyp:storage_monitor',
259 'components.gyp:storage_monitor_test_support',
260 'components.gyp:web_modal',
261 'components.gyp:web_modal_test_support',
264 ['OS == "android" and gtest_target_type == "shared_library"', {
266 '../testing/android/native_test.gyp:native_test_native_code',
271 'storage_monitor/storage_monitor_linux_unittest.cc',
274 '../chromeos/chromeos.gyp:chromeos_test_support',
279 '../dbus/dbus.gyp:dbus',
280 '../device/media_transfer_protocol/media_transfer_protocol.gyp:device_media_transfer_protocol',
283 ['OS=="win" and win_use_allocator_shim==1', {
285 '../base/allocator/allocator.gyp:allocator',
288 ['OS=="linux" and component=="shared_library" and linux_use_tcmalloc==1', {
290 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
293 'ldflags': ['-rdynamic'],
296 ['configuration_policy==1', {
298 'components.gyp:policy_component',
299 'components.gyp:policy_component_test_support',
300 'components.gyp:policy_test_support',
303 'policy/core/browser/autofill_policy_handler_unittest.cc',
304 'policy/core/browser/browser_policy_connector_unittest.cc',
305 'policy/core/browser/configuration_policy_handler_unittest.cc',
306 'policy/core/common/async_policy_provider_unittest.cc',
307 'policy/core/common/cloud/cloud_policy_client_unittest.cc',
308 'policy/core/common/cloud/cloud_policy_core_unittest.cc',
309 'policy/core/common/cloud/cloud_policy_manager_unittest.cc',
310 'policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc',
311 'policy/core/common/cloud/cloud_policy_service_unittest.cc',
312 'policy/core/common/cloud/cloud_policy_validator_unittest.cc',
313 'policy/core/common/cloud/component_cloud_policy_service_unittest.cc',
314 'policy/core/common/cloud/component_cloud_policy_store_unittest.cc',
315 'policy/core/common/cloud/component_cloud_policy_updater_unittest.cc',
316 'policy/core/common/cloud/device_management_service_unittest.cc',
317 'policy/core/common/cloud/external_policy_data_fetcher_unittest.cc',
318 'policy/core/common/cloud/external_policy_data_updater_unittest.cc',
319 'policy/core/common/cloud/policy_header_io_helper_unittest.cc',
320 'policy/core/common/cloud/policy_header_service_unittest.cc',
321 'policy/core/common/cloud/rate_limiter_unittest.cc',
322 'policy/core/common/cloud/resource_cache_unittest.cc',
323 'policy/core/common/cloud/user_cloud_policy_manager_unittest.cc',
324 'policy/core/common/cloud/user_cloud_policy_store_unittest.cc',
325 'policy/core/common/cloud/user_info_fetcher_unittest.cc',
326 'policy/core/common/config_dir_policy_loader_unittest.cc',
327 'policy/core/common/forwarding_policy_provider_unittest.cc',
328 'policy/core/common/generate_policy_source_unittest.cc',
329 'policy/core/common/policy_bundle_unittest.cc',
330 'policy/core/common/policy_loader_mac_unittest.cc',
331 'policy/core/common/policy_loader_win_unittest.cc',
332 'policy/core/common/policy_map_unittest.cc',
333 'policy/core/common/policy_provider_android_unittest.cc',
334 'policy/core/common/policy_service_impl_unittest.cc',
335 'policy/core/common/policy_statistics_collector_unittest.cc',
336 'policy/core/common/preg_parser_win_unittest.cc',
337 'policy/core/common/registry_dict_win_unittest.cc',
338 'policy/core/common/schema_map_unittest.cc',
339 'policy/core/common/schema_registry_unittest.cc',
340 'policy/core/common/schema_unittest.cc',
343 ['OS=="android" or OS=="ios"', {
344 # Note: 'sources!' is processed before any 'sources/', so the
345 # ['include', '^policy/'] on iOS above will include all of the
346 # policy source files again. Using 'source/' here too will get
347 # these files excluded as expected.
349 ['exclude', '^policy/core/common/async_policy_provider_unittest\\.cc'],
350 ['exclude', '^policy/core/common/cloud/component_cloud_policy_service_unittest\\.cc'],
351 ['exclude', '^policy/core/common/cloud/component_cloud_policy_store_unittest\\.cc'],
352 ['exclude', '^policy/core/common/cloud/component_cloud_policy_updater_unittest\\.cc'],
353 ['exclude', '^policy/core/common/cloud/external_policy_data_fetcher_unittest\\.cc'],
354 ['exclude', '^policy/core/common/cloud/external_policy_data_updater_unittest\\.cc'],
355 ['exclude', '^policy/core/common/cloud/resource_cache_unittest\\.cc'],
356 ['exclude', '^policy/core/common/config_dir_policy_loader_unittest\\.cc'],
361 'policy/core/common/proxy_policy_provider_unittest.cc',
364 'policy/core/common/cloud/user_cloud_policy_manager_unittest.cc',
365 'policy/core/common/cloud/user_cloud_policy_store_unittest.cc',
371 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
372 'msvs_disabled_warnings': [4267, ],
376 ['OS != "ios" and android_webview_build == 0', {
379 'target_name': 'components_perftests',
380 'type': '<(gtest_target_type)',
382 '../base/base.gyp:base',
383 '../base/base.gyp:test_support_perf',
384 '../content/content_shell_and_tests.gyp:test_support_content',
385 '../testing/gtest.gyp:gtest',
386 'components.gyp:visitedlink_browser',
392 'visitedlink/test/visitedlink_perftest.cc',
395 ['OS == "android" and gtest_target_type == "shared_library"', {
397 '../testing/android/native_test.gyp:native_test_native_code',
401 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
402 'msvs_disabled_warnings': [ 4267, ],
406 ['OS == "android" and gtest_target_type == "shared_library"', {
409 'target_name': 'components_unittests_apk',
412 'components_unittests',
415 'test_suite_name': 'components_unittests',
416 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)components_unittests<(SHARED_LIB_SUFFIX)',
418 'includes': [ '../build/apk_test.gypi' ],
427 'target_name': 'components_browsertests',
428 'type': '<(gtest_target_type)',
429 'defines!': ['CONTENT_IMPLEMENTATION'],
431 '../content/content_shell_and_tests.gyp:content_browser_test_support',
432 '../content/content_shell_and_tests.gyp:test_support_content',
433 '../skia/skia.gyp:skia',
434 '../testing/gtest.gyp:gtest',
435 'components.gyp:dom_distiller_content',
436 'components.gyp:dom_distiller_core',
442 'HAS_OUT_OF_PROC_TEST_RUNNER',
445 '../content/test/content_test_launcher.cc',
446 'dom_distiller/content/distiller_page_web_contents_browsertest.cc',
450 'resource_include_dirs': [
451 '<(SHARED_INTERMEDIATE_DIR)/webkit',
454 '../content/shell/app/resource.h',
455 '../content/shell/app/shell.rc',
456 # TODO: It would be nice to have these pulled in
457 # automatically from direct_dependent_settings in
458 # their various targets (net.gyp:net_resources, etc.),
459 # but that causes errors in other targets when
460 # resulting .res files get referenced multiple times.
461 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
462 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.rc',
463 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.rc',
466 '<(DEPTH)/net/net.gyp:net_resources',
467 '<(DEPTH)/third_party/iaccessible2/iaccessible2.gyp:iaccessible2',
468 '<(DEPTH)/third_party/isimpledom/isimpledom.gyp:isimpledom',
469 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
470 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
476 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
481 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
482 'msvs_disabled_warnings': [ 4267, ],
484 ['OS=="win" and win_use_allocator_shim==1', {
486 '../base/allocator/allocator.gyp:allocator',