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/dom_distiller_test_util.cc',
35 'dom_distiller/core/dom_distiller_test_util.h',
36 'dom_distiller/core/fake_db.cc',
37 'dom_distiller/core/fake_db.h',
38 'dom_distiller/core/fake_distiller.cc',
39 'dom_distiller/core/fake_distiller.h',
40 'dom_distiller/core/task_tracker_unittest.cc',
41 'json_schema/json_schema_validator_unittest.cc',
42 'json_schema/json_schema_validator_unittest_base.cc',
43 'json_schema/json_schema_validator_unittest_base.h',
44 'navigation_interception/intercept_navigation_resource_throttle_unittest.cc',
45 'precache/content/precache_manager_unittest.cc',
46 'precache/core/precache_database_unittest.cc',
47 'precache/core/precache_fetcher_unittest.cc',
48 'precache/core/precache_url_table_unittest.cc',
49 'sessions/serialized_navigation_entry_unittest.cc',
50 'test/run_all_unittests.cc',
51 'translate/core/common/translate_metrics_unittest.cc',
52 'translate/core/common/translate_util_unittest.cc',
53 'translate/language_detection/language_detection_util_unittest.cc',
54 'url_matcher/regex_set_matcher_unittest.cc',
55 'url_matcher/string_pattern_unittest.cc',
56 'url_matcher/substring_set_matcher_unittest.cc',
57 'url_matcher/url_matcher_factory_unittest.cc',
58 'url_matcher/url_matcher_unittest.cc',
59 # TODO(asvitkine): These should be tested on iOS too.
60 'variations/entropy_provider_unittest.cc',
61 'variations/metrics_util_unittest.cc',
62 'variations/variations_associated_data_unittest.cc',
63 'variations/variations_seed_processor_unittest.cc',
64 'variations/variations_seed_simulator_unittest.cc',
65 'visitedlink/test/visitedlink_unittest.cc',
66 'webdata/encryptor/encryptor_password_mac_unittest.cc',
67 'webdata/encryptor/encryptor_unittest.cc',
68 'webdata/encryptor/ie7_password_unittest_win.cc',
69 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
75 '../base/base.gyp:base_prefs_test_support',
76 '../base/base.gyp:test_support_base',
77 # TODO(blundell): Eliminate the need for this dependency in code
78 # that iOS shares. crbug.com/325243
79 '../content/content_shell_and_tests.gyp:test_support_content',
80 '../sync/sync.gyp:sync',
81 '../testing/gmock.gyp:gmock',
82 '../testing/gtest.gyp:gtest',
83 '../ui/gfx/gfx.gyp:gfx',
86 # Dependencies of auto_login_parser
87 'components.gyp:auto_login_parser',
89 # Dependencies of autofill
90 'components.gyp:autofill_core_browser',
91 'components.gyp:autofill_core_common',
92 'components.gyp:autofill_core_test_support',
94 # Dependencies of dom_distiller
95 'components.gyp:distilled_page_proto',
96 'components.gyp:dom_distiller_core',
98 # Dependencies of encryptor
99 'components.gyp:encryptor',
101 # Dependencies of json_schema
102 'components.gyp:json_schema',
104 # Dependencies of precache/core
105 'components.gyp:precache_core',
107 # Dependencies of translate.
108 'components.gyp:translate_core_common',
109 'components.gyp:translate_language_detection',
111 # Dependencies of variations
112 'components.gyp:variations',
117 # Dependencies of browser_context_keyed_service
118 'components.gyp:browser_context_keyed_service',
121 # intercept_navigation_resource_throttle_unittest.cc
122 '../skia/skia.gyp:skia',
123 'components.gyp:navigation_interception',
125 # Dependencies of precache/content
126 'components.gyp:precache_content',
128 # Dependencies of sessions
129 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
130 'components.gyp:sessions',
131 'components.gyp:sessions_test_support',
133 # Dependencies of url_matcher.
134 'components.gyp:url_matcher',
136 # Dependencies of visitedlink
137 'components.gyp:visitedlink_browser',
138 'components.gyp:visitedlink_renderer',
139 '../content/content_resources.gyp:content_resources',
141 # Dependencies of web_modal
142 'components.gyp:web_modal',
143 'components.gyp:web_modal_test_support',
147 ['exclude', '\\.cc$'],
148 ['include', '^test/run_all_unittests\\.cc$'],
149 # TODO(ios): Include files here as they are made to work, see
150 # http://crbug.com/303011.
151 # TODO(asvitkine): Bring up variations/ unittests on iOS.
152 # TODO(blundell): Bring up json_schema/ unittests on iOS.
153 ['include', '^auto_login_parser/'],
154 ['include', '^autofill/'],
155 ['include', '^dom_distiller/'],
156 ['include', '^precache/core/'],
157 ['include', '^translate/'],
160 ['disable_nacl==0', {
162 'nacl/browser/nacl_file_host_unittest.cc',
163 'nacl/browser/nacl_process_host_unittest.cc',
164 'nacl/browser/nacl_validation_cache_unittest.cc',
165 'nacl/browser/pnacl_host_unittest.cc',
166 'nacl/browser/pnacl_translation_cache_unittest.cc',
167 'nacl/browser/test_nacl_browser_delegate.cc',
170 'nacl.gyp:nacl_browser',
171 'nacl.gyp:nacl_common',
177 '$(SDKROOT)/System/Library/Frameworks/AddressBook.framework',
181 ['OS == "android"', {
183 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
186 'components.gyp:web_modal',
187 'components.gyp:web_modal_test_support',
190 ['OS == "android" and gtest_target_type == "shared_library"', {
192 '../testing/android/native_test.gyp:native_test_native_code',
195 ['OS=="win" and win_use_allocator_shim==1', {
197 '../base/allocator/allocator.gyp:allocator',
200 ['OS=="linux" and component=="shared_library" and linux_use_tcmalloc==1', {
202 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
205 'ldflags': ['-rdynamic'],
208 ['configuration_policy==1', {
210 'components.gyp:policy_component',
211 'components.gyp:policy_component_test_support',
212 'components.gyp:policy_test_support',
215 'policy/core/common/async_policy_provider_unittest.cc',
216 'policy/core/common/cloud/cloud_policy_client_unittest.cc',
217 'policy/core/common/cloud/cloud_policy_core_unittest.cc',
218 'policy/core/common/cloud/cloud_policy_manager_unittest.cc',
219 'policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc',
220 'policy/core/common/cloud/cloud_policy_service_unittest.cc',
221 'policy/core/common/cloud/cloud_policy_validator_unittest.cc',
222 'policy/core/common/cloud/component_cloud_policy_service_unittest.cc',
223 'policy/core/common/cloud/component_cloud_policy_store_unittest.cc',
224 'policy/core/common/cloud/component_cloud_policy_updater_unittest.cc',
225 'policy/core/common/cloud/device_management_service_unittest.cc',
226 'policy/core/common/cloud/external_policy_data_fetcher_unittest.cc',
227 'policy/core/common/cloud/external_policy_data_updater_unittest.cc',
228 'policy/core/common/cloud/policy_header_io_helper_unittest.cc',
229 'policy/core/common/cloud/policy_header_service_unittest.cc',
230 'policy/core/common/cloud/rate_limiter_unittest.cc',
231 'policy/core/common/cloud/resource_cache_unittest.cc',
232 'policy/core/common/cloud/user_cloud_policy_manager_unittest.cc',
233 'policy/core/common/cloud/user_cloud_policy_store_unittest.cc',
234 'policy/core/common/cloud/user_info_fetcher_unittest.cc',
235 'policy/core/common/config_dir_policy_loader_unittest.cc',
236 'policy/core/common/forwarding_policy_provider_unittest.cc',
237 'policy/core/common/generate_policy_source_unittest.cc',
238 'policy/core/common/policy_bundle_unittest.cc',
239 'policy/core/common/policy_loader_mac_unittest.cc',
240 'policy/core/common/policy_loader_win_unittest.cc',
241 'policy/core/common/policy_map_unittest.cc',
242 'policy/core/common/policy_service_impl_unittest.cc',
243 'policy/core/common/policy_statistics_collector_unittest.cc',
244 'policy/core/common/preg_parser_win_unittest.cc',
245 'policy/core/common/registry_dict_win_unittest.cc',
246 'policy/core/common/schema_map_unittest.cc',
247 'policy/core/common/schema_registry_unittest.cc',
248 'policy/core/common/schema_unittest.cc',
253 'policy/core/common/async_policy_provider_unittest.cc',
254 'policy/core/common/cloud/component_cloud_policy_service_unittest.cc',
255 'policy/core/common/cloud/component_cloud_policy_store_unittest.cc',
256 'policy/core/common/cloud/component_cloud_policy_updater_unittest.cc',
257 'policy/core/common/cloud/external_policy_data_fetcher_unittest.cc',
258 'policy/core/common/cloud/external_policy_data_updater_unittest.cc',
259 'policy/core/common/cloud/resource_cache_unittest.cc',
260 'policy/core/common/config_dir_policy_loader_unittest.cc',
265 'policy/core/common/cloud/user_cloud_policy_manager_unittest.cc',
266 'policy/core/common/cloud/user_cloud_policy_store_unittest.cc',
272 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
273 'msvs_disabled_warnings': [4267, ],
277 ['OS != "ios" and android_webview_build == 0', {
280 'target_name': 'components_perftests',
281 'type': '<(gtest_target_type)',
283 '../base/base.gyp:base',
284 '../base/base.gyp:test_support_perf',
285 '../content/content_shell_and_tests.gyp:test_support_content',
286 '../testing/gtest.gyp:gtest',
287 'components.gyp:visitedlink_browser',
293 'visitedlink/test/visitedlink_perftest.cc',
296 ['OS == "android" and gtest_target_type == "shared_library"', {
298 '../testing/android/native_test.gyp:native_test_native_code',
302 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
303 'msvs_disabled_warnings': [ 4267, ],
307 ['OS == "android" and gtest_target_type == "shared_library"', {
310 'target_name': 'components_unittests_apk',
313 'components_unittests',
316 'test_suite_name': 'components_unittests',
317 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)components_unittests<(SHARED_LIB_SUFFIX)',
319 'includes': [ '../build/apk_test.gypi' ],
328 'target_name': 'components_browsertests',
329 'type': '<(gtest_target_type)',
330 'defines!': ['CONTENT_IMPLEMENTATION'],
332 '../content/content_shell_and_tests.gyp:content_browser_test_support',
333 '../content/content_shell_and_tests.gyp:test_support_content',
334 '../skia/skia.gyp:skia',
335 '../testing/gtest.gyp:gtest',
336 'components.gyp:dom_distiller_content',
337 'components.gyp:dom_distiller_core',
343 'HAS_OUT_OF_PROC_TEST_RUNNER',
346 '../content/test/content_test_launcher.cc',
347 'dom_distiller/content/distiller_page_web_contents_browsertest.cc',
351 'resource_include_dirs': [
352 '<(SHARED_INTERMEDIATE_DIR)/webkit',
355 '../content/shell/app/resource.h',
356 '../content/shell/app/shell.rc',
357 # TODO: It would be nice to have these pulled in
358 # automatically from direct_dependent_settings in
359 # their various targets (net.gyp:net_resources, etc.),
360 # but that causes errors in other targets when
361 # resulting .res files get referenced multiple times.
362 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
363 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.rc',
364 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.rc',
367 '<(DEPTH)/net/net.gyp:net_resources',
368 '<(DEPTH)/third_party/iaccessible2/iaccessible2.gyp:iaccessible2',
369 '<(DEPTH)/third_party/isimpledom/isimpledom.gyp:isimpledom',
370 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
371 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
377 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
382 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
383 'msvs_disabled_warnings': [ 4267, ],
385 ['OS=="win" and win_use_allocator_shim==1', {
387 '../base/allocator/allocator.gyp:allocator',