1 # Copyright (c) 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 'dom_distiller/core/article_entry_unittest.cc',
28 'dom_distiller/core/distiller_unittest.cc',
29 'dom_distiller/core/distiller_url_fetcher_unittest.cc',
30 'dom_distiller/core/dom_distiller_database_unittest.cc',
31 'dom_distiller/core/dom_distiller_model_unittest.cc',
32 'dom_distiller/core/dom_distiller_service_unittest.cc',
33 'dom_distiller/core/dom_distiller_store_unittest.cc',
34 'dom_distiller/core/task_tracker_unittest.cc',
35 'json_schema/json_schema_validator_unittest.cc',
36 'json_schema/json_schema_validator_unittest_base.cc',
37 'json_schema/json_schema_validator_unittest_base.h',
38 'language_usage_metrics/language_usage_metrics_unittest.cc',
39 'navigation_interception/intercept_navigation_resource_throttle_unittest.cc',
40 'precache/content/precache_manager_unittest.cc',
41 'precache/core/precache_database_unittest.cc',
42 'precache/core/precache_fetcher_unittest.cc',
43 'precache/core/precache_url_table_unittest.cc',
44 'sessions/serialized_navigation_entry_unittest.cc',
45 'signin/core/webdata/token_service_table_unittest.cc',
46 'test/run_all_unittests.cc',
47 'translate/core/browser/language_state_unittest.cc',
48 'translate/core/browser/translate_browser_metrics_unittest.cc',
49 'translate/core/common/translate_metrics_unittest.cc',
50 'translate/core/common/translate_util_unittest.cc',
51 'translate/language_detection/language_detection_util_unittest.cc',
52 'url_matcher/regex_set_matcher_unittest.cc',
53 'url_matcher/string_pattern_unittest.cc',
54 'url_matcher/substring_set_matcher_unittest.cc',
55 'url_matcher/url_matcher_factory_unittest.cc',
56 'url_matcher/url_matcher_unittest.cc',
57 # TODO(asvitkine): These should be tested on iOS too.
58 'variations/entropy_provider_unittest.cc',
59 'variations/metrics_util_unittest.cc',
60 'variations/variations_associated_data_unittest.cc',
61 'variations/variations_seed_processor_unittest.cc',
62 'variations/variations_seed_simulator_unittest.cc',
63 'visitedlink/test/visitedlink_unittest.cc',
64 'webdata/encryptor/encryptor_password_mac_unittest.cc',
65 'webdata/encryptor/encryptor_unittest.cc',
66 'webdata/encryptor/ie7_password_unittest_win.cc',
67 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
73 '../base/base.gyp:base_prefs_test_support',
74 '../base/base.gyp:test_support_base',
75 # TODO(blundell): Eliminate the need for this dependency in code
76 # that iOS shares. crbug.com/325243
77 '../content/content_shell_and_tests.gyp:test_support_content',
78 '../sync/sync.gyp:sync',
79 '../testing/gmock.gyp:gmock',
80 '../testing/gtest.gyp:gtest',
81 '../ui/gfx/gfx.gyp:gfx',
84 # Dependencies of auto_login_parser
85 'components.gyp:auto_login_parser',
87 # Dependencies of autofill
88 'components.gyp:autofill_core_browser',
89 'components.gyp:autofill_core_common',
90 'components.gyp:autofill_core_test_support',
92 # Dependencies of dom_distiller
93 'components.gyp:distilled_page_proto',
94 'components.gyp:dom_distiller_core',
95 'components.gyp:dom_distiller_test_support',
97 # Dependencies of encryptor
98 'components.gyp:encryptor',
100 # Dependencies of json_schema
101 'components.gyp:json_schema',
103 # Dependencies of language_usage_metrics
104 'components.gyp:language_usage_metrics',
106 # Dependencies of precache/core
107 'components.gyp:precache_core',
109 # Dependencies of signin
110 'components.gyp:signin_core',
112 # Dependencies of translate.
113 'components.gyp:translate_core_browser',
114 'components.gyp:translate_core_common',
115 'components.gyp:translate_language_detection',
117 # Dependencies of variations
118 'components.gyp:variations',
123 # Dependencies of browser_context_keyed_service
124 'components.gyp:browser_context_keyed_service',
127 # intercept_navigation_resource_throttle_unittest.cc
128 '../skia/skia.gyp:skia',
129 'components.gyp:navigation_interception',
131 # Dependencies of precache/content
132 'components.gyp:precache_content',
134 # Dependencies of sessions
135 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
136 'components.gyp:sessions',
137 'components.gyp:sessions_test_support',
139 # Dependencies of url_matcher.
140 'components.gyp:url_matcher',
142 # Dependencies of visitedlink
143 'components.gyp:visitedlink_browser',
144 'components.gyp:visitedlink_renderer',
145 '../content/content_resources.gyp:content_resources',
147 # Dependencies of web_modal
148 'components.gyp:web_modal',
149 'components.gyp:web_modal_test_support',
153 ['exclude', '\\.cc$'],
154 ['include', '^test/run_all_unittests\\.cc$'],
155 # TODO(ios): Include files here as they are made to work, see
156 # http://crbug.com/303011.
157 # TODO(asvitkine): Bring up variations/ unittests on iOS.
158 # TODO(blundell): Bring up json_schema/ unittests on iOS.
159 ['include', '^auto_login_parser/'],
160 ['include', '^autofill/'],
161 ['include', '^dom_distiller/'],
162 ['include', '^language_usage_metrics/'],
163 ['include', '^precache/core/'],
164 ['include', '^signin/'],
165 ['include', '^translate/'],
168 ['configuration_policy==1', {
170 ['include', '^policy/'],
175 ['disable_nacl==0', {
177 'nacl/browser/nacl_file_host_unittest.cc',
178 'nacl/browser/nacl_process_host_unittest.cc',
179 'nacl/browser/nacl_validation_cache_unittest.cc',
180 'nacl/browser/pnacl_host_unittest.cc',
181 'nacl/browser/pnacl_translation_cache_unittest.cc',
182 'nacl/browser/test_nacl_browser_delegate.cc',
185 'nacl.gyp:nacl_browser',
186 'nacl.gyp:nacl_common',
192 '$(SDKROOT)/System/Library/Frameworks/AddressBook.framework',
196 ['OS == "android"', {
198 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
201 'components.gyp:web_modal',
202 'components.gyp:web_modal_test_support',
205 ['OS == "android" and gtest_target_type == "shared_library"', {
207 '../testing/android/native_test.gyp:native_test_native_code',
210 ['OS=="win" and win_use_allocator_shim==1', {
212 '../base/allocator/allocator.gyp:allocator',
215 ['OS=="linux" and component=="shared_library" and linux_use_tcmalloc==1', {
217 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
220 'ldflags': ['-rdynamic'],
223 ['configuration_policy==1', {
225 'components.gyp:policy_component',
226 'components.gyp:policy_component_test_support',
227 'components.gyp:policy_test_support',
230 'policy/core/browser/autofill_policy_handler_unittest.cc',
231 'policy/core/browser/browser_policy_connector_unittest.cc',
232 'policy/core/common/async_policy_provider_unittest.cc',
233 'policy/core/common/cloud/cloud_policy_client_unittest.cc',
234 'policy/core/common/cloud/cloud_policy_core_unittest.cc',
235 'policy/core/common/cloud/cloud_policy_manager_unittest.cc',
236 'policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc',
237 'policy/core/common/cloud/cloud_policy_service_unittest.cc',
238 'policy/core/common/cloud/cloud_policy_validator_unittest.cc',
239 'policy/core/common/cloud/component_cloud_policy_service_unittest.cc',
240 'policy/core/common/cloud/component_cloud_policy_store_unittest.cc',
241 'policy/core/common/cloud/component_cloud_policy_updater_unittest.cc',
242 'policy/core/common/cloud/device_management_service_unittest.cc',
243 'policy/core/common/cloud/external_policy_data_fetcher_unittest.cc',
244 'policy/core/common/cloud/external_policy_data_updater_unittest.cc',
245 'policy/core/common/cloud/policy_header_io_helper_unittest.cc',
246 'policy/core/common/cloud/policy_header_service_unittest.cc',
247 'policy/core/common/cloud/rate_limiter_unittest.cc',
248 'policy/core/common/cloud/resource_cache_unittest.cc',
249 'policy/core/common/cloud/user_cloud_policy_manager_unittest.cc',
250 'policy/core/common/cloud/user_cloud_policy_store_unittest.cc',
251 'policy/core/common/cloud/user_info_fetcher_unittest.cc',
252 'policy/core/common/config_dir_policy_loader_unittest.cc',
253 'policy/core/common/forwarding_policy_provider_unittest.cc',
254 'policy/core/common/generate_policy_source_unittest.cc',
255 'policy/core/common/policy_bundle_unittest.cc',
256 'policy/core/common/policy_loader_mac_unittest.cc',
257 'policy/core/common/policy_loader_win_unittest.cc',
258 'policy/core/common/policy_map_unittest.cc',
259 'policy/core/common/policy_service_impl_unittest.cc',
260 'policy/core/common/policy_statistics_collector_unittest.cc',
261 'policy/core/common/preg_parser_win_unittest.cc',
262 'policy/core/common/registry_dict_win_unittest.cc',
263 'policy/core/common/schema_map_unittest.cc',
264 'policy/core/common/schema_registry_unittest.cc',
265 'policy/core/common/schema_unittest.cc',
268 ['OS=="android" or OS=="ios"', {
269 # Note: 'sources!' is processed before any 'sources/', so the
270 # ['include', '^policy/'] on iOS above will include all of the
271 # policy source files again. Using 'source/' here too will get
272 # these files excluded as expected.
274 ['exclude', '^policy/core/common/async_policy_provider_unittest\\.cc'],
275 ['exclude', '^policy/core/common/cloud/component_cloud_policy_service_unittest\\.cc'],
276 ['exclude', '^policy/core/common/cloud/component_cloud_policy_store_unittest\\.cc'],
277 ['exclude', '^policy/core/common/cloud/component_cloud_policy_updater_unittest\\.cc'],
278 ['exclude', '^policy/core/common/cloud/external_policy_data_fetcher_unittest\\.cc'],
279 ['exclude', '^policy/core/common/cloud/external_policy_data_updater_unittest\\.cc'],
280 ['exclude', '^policy/core/common/cloud/resource_cache_unittest\\.cc'],
281 ['exclude', '^policy/core/common/config_dir_policy_loader_unittest\\.cc'],
286 'policy/core/common/proxy_policy_provider_unittest.cc',
289 'policy/core/common/cloud/user_cloud_policy_manager_unittest.cc',
290 'policy/core/common/cloud/user_cloud_policy_store_unittest.cc',
296 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
297 'msvs_disabled_warnings': [4267, ],
301 ['OS != "ios" and android_webview_build == 0', {
304 'target_name': 'components_perftests',
305 'type': '<(gtest_target_type)',
307 '../base/base.gyp:base',
308 '../base/base.gyp:test_support_perf',
309 '../content/content_shell_and_tests.gyp:test_support_content',
310 '../testing/gtest.gyp:gtest',
311 'components.gyp:visitedlink_browser',
317 'visitedlink/test/visitedlink_perftest.cc',
320 ['OS == "android" and gtest_target_type == "shared_library"', {
322 '../testing/android/native_test.gyp:native_test_native_code',
326 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
327 'msvs_disabled_warnings': [ 4267, ],
331 ['OS == "android" and gtest_target_type == "shared_library"', {
334 'target_name': 'components_unittests_apk',
337 'components_unittests',
340 'test_suite_name': 'components_unittests',
341 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)components_unittests<(SHARED_LIB_SUFFIX)',
343 'includes': [ '../build/apk_test.gypi' ],
352 'target_name': 'components_browsertests',
353 'type': '<(gtest_target_type)',
354 'defines!': ['CONTENT_IMPLEMENTATION'],
356 '../content/content_shell_and_tests.gyp:content_browser_test_support',
357 '../content/content_shell_and_tests.gyp:test_support_content',
358 '../skia/skia.gyp:skia',
359 '../testing/gtest.gyp:gtest',
360 'components.gyp:dom_distiller_content',
361 'components.gyp:dom_distiller_core',
367 'HAS_OUT_OF_PROC_TEST_RUNNER',
370 '../content/test/content_test_launcher.cc',
371 'dom_distiller/content/distiller_page_web_contents_browsertest.cc',
375 'resource_include_dirs': [
376 '<(SHARED_INTERMEDIATE_DIR)/webkit',
379 '../content/shell/app/resource.h',
380 '../content/shell/app/shell.rc',
381 # TODO: It would be nice to have these pulled in
382 # automatically from direct_dependent_settings in
383 # their various targets (net.gyp:net_resources, etc.),
384 # but that causes errors in other targets when
385 # resulting .res files get referenced multiple times.
386 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
387 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.rc',
388 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.rc',
391 '<(DEPTH)/net/net.gyp:net_resources',
392 '<(DEPTH)/third_party/iaccessible2/iaccessible2.gyp:iaccessible2',
393 '<(DEPTH)/third_party/isimpledom/isimpledom.gyp:isimpledom',
394 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
395 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
401 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
406 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
407 'msvs_disabled_warnings': [ 4267, ],
409 ['OS=="win" and win_use_allocator_shim==1', {
411 '../base/allocator/allocator.gyp:allocator',