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/common/form_data_unittest.cc',
22 'autofill/core/common/form_field_data_unittest.cc',
23 'autofill/core/common/password_form_fill_data_unittest.cc',
24 'browser_context_keyed_service/browser_context_dependency_manager_unittest.cc',
25 'browser_context_keyed_service/dependency_graph_unittest.cc',
26 'dom_distiller/core/article_entry_unittest.cc',
27 'dom_distiller/core/distiller_unittest.cc',
28 'dom_distiller/core/distiller_url_fetcher_unittest.cc',
29 'dom_distiller/core/dom_distiller_database_unittest.cc',
30 'dom_distiller/core/dom_distiller_model_unittest.cc',
31 'dom_distiller/core/dom_distiller_service_unittest.cc',
32 'dom_distiller/core/dom_distiller_store_unittest.cc',
33 'dom_distiller/core/fake_distiller.cc',
34 'dom_distiller/core/fake_distiller.h',
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 'navigation_interception/intercept_navigation_resource_throttle_unittest.cc',
40 'precache/core/precache_fetcher_unittest.cc',
41 'sessions/serialized_navigation_entry_unittest.cc',
42 'test/run_all_unittests.cc',
43 'translate/common/translate_metrics_unittest.cc',
44 'translate/common/translate_util_unittest.cc',
45 'translate/language_detection/language_detection_util_unittest.cc',
46 # TODO(asvitkine): These should be tested on iOS too.
47 'variations/entropy_provider_unittest.cc',
48 'variations/metrics_util_unittest.cc',
49 'variations/variations_associated_data_unittest.cc',
50 'variations/variations_seed_processor_unittest.cc',
51 'visitedlink/test/visitedlink_unittest.cc',
52 'webdata/encryptor/encryptor_password_mac_unittest.cc',
53 'webdata/encryptor/encryptor_unittest.cc',
54 'webdata/encryptor/ie7_password_unittest_win.cc',
55 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
61 '../base/base.gyp:test_support_base',
62 '../sync/sync.gyp:sync',
63 '../testing/gmock.gyp:gmock',
64 '../testing/gtest.gyp:gtest',
66 # Dependencies of autofill
67 'components.gyp:autofill_core_browser',
68 'components.gyp:autofill_core_common',
70 # Dependencies of auto_login_parser
71 'components.gyp:auto_login_parser',
73 # Dependencies of browser_context_keyed_service
74 'components.gyp:browser_context_keyed_service',
76 # Dependencies of dom_distiller
77 'components.gyp:distilled_page_proto',
78 'components.gyp:dom_distiller_core',
80 # Dependencies of encryptor
81 'components.gyp:encryptor',
83 # Dependencies of json_schema
84 'components.gyp:json_schema',
86 # Dependencies of intercept_navigation_resource_throttle_unittest.cc
87 '../content/content_shell_and_tests.gyp:test_support_content',
88 '../skia/skia.gyp:skia',
89 'components.gyp:navigation_interception',
91 # Dependencies of policy
92 'components.gyp:policy_component',
94 # Dependencies of precache
95 'components.gyp:precache_core',
96 'components.gyp:precache_core_proto',
98 # Dependencies of sessions
99 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
100 'components.gyp:sessions',
101 'components.gyp:sessions_test_support',
103 # Dependencies of translate.
104 'components.gyp:translate_common',
105 'components.gyp:translate_language_detection',
107 # Dependencies of variations
108 'components.gyp:variations',
110 # Dependencies of visitedlink
111 'components.gyp:visitedlink_browser',
112 'components.gyp:visitedlink_renderer',
113 '../content/content_resources.gyp:content_resources',
115 'components.gyp:web_modal',
116 'components.gyp:web_modal_test_support',
121 ['exclude', '\\.cc$'],
122 ['include', '^test/run_all_unittests\\.cc$'],
123 # TODO(ios): Include files here as they are made to work, see
124 # http://crbug.com/303011.
125 # TODO(asvitkine): Bring up varations/ unittests on iOS.
126 ['include', '^dom_distiller'],
127 ['include', '^translate'],
130 'autofill_core_common',
131 'navigation_interception',
132 'visitedlink_renderer',
135 ['disable_nacl==0', {
137 'nacl/browser/nacl_validation_cache_unittest.cc',
138 'nacl/browser/pnacl_translation_cache_unittest.cc',
141 'nacl.gyp:nacl_browser',
142 'nacl_common.gyp:nacl_common',
145 ['OS == "android"', {
147 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
150 'components.gyp:web_modal',
151 'components.gyp:web_modal_test_support',
154 ['OS == "android" and gtest_target_type == "shared_library"', {
156 '../testing/android/native_test.gyp:native_test_native_code',
159 ['OS=="win" and win_use_allocator_shim==1', {
161 '../base/allocator/allocator.gyp:allocator',
164 ['OS=="linux" and component=="shared_library" and linux_use_tcmalloc==1', {
166 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
169 'ldflags': ['-rdynamic'],
172 ['configuration_policy==1', {
174 'policy/core/common/schema_unittest.cc',
178 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
179 'msvs_disabled_warnings': [4267, ],
183 ['OS != "ios" and android_webview_build == 0', {
186 'target_name': 'components_perftests',
187 'type': '<(gtest_target_type)',
189 '../base/base.gyp:base',
190 '../base/base.gyp:test_support_perf',
191 '../content/content_shell_and_tests.gyp:test_support_content',
192 '../testing/gtest.gyp:gtest',
193 '../ui/compositor/compositor.gyp:compositor',
194 'components.gyp:visitedlink_browser',
200 'visitedlink/test/visitedlink_perftest.cc',
203 ['OS == "android" and gtest_target_type == "shared_library"', {
205 '../testing/android/native_test.gyp:native_test_native_code',
209 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
210 'msvs_disabled_warnings': [ 4267, ],
214 ['OS == "android" and gtest_target_type == "shared_library"', {
217 'target_name': 'components_unittests_apk',
220 'components_unittests',
223 'test_suite_name': 'components_unittests',
224 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)components_unittests<(SHARED_LIB_SUFFIX)',
226 'includes': [ '../build/apk_test.gypi' ],
235 'target_name': 'components_browsertests',
236 'type': '<(gtest_target_type)',
237 'defines!': ['CONTENT_IMPLEMENTATION'],
239 '../content/content_shell_and_tests.gyp:content_browser_test_support',
240 '../content/content_shell_and_tests.gyp:test_support_content',
241 '../skia/skia.gyp:skia',
242 '../testing/gtest.gyp:gtest',
243 'components.gyp:dom_distiller_content',
244 'components.gyp:dom_distiller_core',
250 'HAS_OUT_OF_PROC_TEST_RUNNER',
253 '../content/test/content_test_launcher.cc',
254 'dom_distiller/content/distiller_page_web_contents_browsertest.cc',
258 'resource_include_dirs': [
259 '<(SHARED_INTERMEDIATE_DIR)/webkit',
262 '../content/shell/app/resource.h',
263 '../content/shell/app/shell.rc',
264 # TODO: It would be nice to have these pulled in
265 # automatically from direct_dependent_settings in
266 # their various targets (net.gyp:net_resources, etc.),
267 # but that causes errors in other targets when
268 # resulting .res files get referenced multiple times.
269 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
270 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.rc',
271 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.rc',
274 '<(DEPTH)/net/net.gyp:net_resources',
275 '<(DEPTH)/third_party/iaccessible2/iaccessible2.gyp:iaccessible2',
276 '<(DEPTH)/third_party/isimpledom/isimpledom.gyp:isimpledom',
277 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
278 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
284 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
289 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
290 'msvs_disabled_warnings': [ 4267, ],
292 ['OS=="win" and win_use_allocator_shim==1', {
294 '../base/allocator/allocator.gyp:allocator',