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/distiller_url_fetcher_unittest.cc',
27 'dom_distiller/core/dom_distiller_database_unittest.cc',
28 'dom_distiller/core/dom_distiller_model_unittest.cc',
29 'dom_distiller/core/dom_distiller_store_unittest.cc',
30 'dom_distiller/core/article_entry_unittest.cc',
31 'json_schema/json_schema_validator_unittest.cc',
32 'json_schema/json_schema_validator_unittest_base.cc',
33 'json_schema/json_schema_validator_unittest_base.h',
34 'navigation_interception/intercept_navigation_resource_throttle_unittest.cc',
35 'precache/core/precache_fetcher_unittest.cc',
36 'sessions/serialized_navigation_entry_unittest.cc',
37 'test/run_all_unittests.cc',
38 'translate/common/translate_metrics_unittest.cc',
39 'translate/common/translate_util_unittest.cc',
40 'translate/language_detection/language_detection_util_unittest.cc',
41 # TODO(asvitkine): These should be tested on iOS too.
42 'variations/entropy_provider_unittest.cc',
43 'variations/metrics_util_unittest.cc',
44 'variations/variations_associated_data_unittest.cc',
45 'variations/variations_seed_processor_unittest.cc',
46 'visitedlink/test/visitedlink_unittest.cc',
47 'webdata/encryptor/encryptor_password_mac_unittest.cc',
48 'webdata/encryptor/encryptor_unittest.cc',
49 'webdata/encryptor/ie7_password_unittest_win.cc',
50 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
56 '../base/base.gyp:test_support_base',
57 '../sync/sync.gyp:sync',
58 '../testing/gmock.gyp:gmock',
59 '../testing/gtest.gyp:gtest',
61 # Dependencies of autofill
62 'components.gyp:autofill_core_browser',
63 'components.gyp:autofill_core_common',
65 # Dependencies of auto_login_parser
66 'components.gyp:auto_login_parser',
68 # Dependencies of browser_context_keyed_service
69 'components.gyp:browser_context_keyed_service',
71 # Dependencies of dom_distiller
72 'components.gyp:distilled_page_proto',
73 'components.gyp:dom_distiller_core',
75 # Dependencies of encryptor
76 'components.gyp:encryptor',
78 # Dependencies of json_schema
79 'components.gyp:json_schema',
81 # Dependencies of intercept_navigation_resource_throttle_unittest.cc
82 '../content/content_shell_and_tests.gyp:test_support_content',
83 '../skia/skia.gyp:skia',
84 'components.gyp:navigation_interception',
86 # Dependencies of policy
87 'components.gyp:policy_component',
89 # Dependencies of precache
90 'components.gyp:precache_core',
91 'components.gyp:precache_core_proto',
93 # Dependencies of sessions
94 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
95 'components.gyp:sessions',
96 'components.gyp:sessions_test_support',
98 # Dependencies of translate.
99 'components.gyp:translate_common',
100 'components.gyp:translate_language_detection',
102 # Dependencies of variations
103 'components.gyp:variations',
105 # Dependencies of visitedlink
106 'components.gyp:visitedlink_browser',
107 'components.gyp:visitedlink_renderer',
108 '../content/content_resources.gyp:content_resources',
110 'components.gyp:web_modal',
111 'components.gyp:web_modal_test_support',
116 ['exclude', '\\.cc$'],
117 ['include', '^test/run_all_unittests\\.cc$'],
118 # TODO(ios): Include files here as they are made to work, see
119 # http://crbug.com/303011.
120 # TODO(asvitkine): Bring up varations/ unittests on iOS.
121 ['include', '^dom_distiller'],
122 ['include', '^translate'],
125 'autofill_core_common',
126 'navigation_interception',
127 'visitedlink_renderer',
130 ['disable_nacl==0', {
132 'nacl/browser/nacl_validation_cache_unittest.cc',
135 'nacl.gyp:nacl_browser',
138 ['OS == "android"', {
140 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
143 'components.gyp:web_modal',
144 'components.gyp:web_modal_test_support',
147 ['OS == "android" and gtest_target_type == "shared_library"', {
149 '../testing/android/native_test.gyp:native_test_native_code',
152 ['OS=="win" and win_use_allocator_shim==1', {
154 '../base/allocator/allocator.gyp:allocator',
157 ['OS=="linux" and component=="shared_library" and linux_use_tcmalloc==1', {
159 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
162 'ldflags': ['-rdynamic'],
165 ['configuration_policy==1', {
167 'policy/core/common/schema_unittest.cc',
171 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
172 'msvs_disabled_warnings': [4267, ],
176 ['OS != "ios" and android_webview_build == 0', {
179 'target_name': 'components_perftests',
180 'type': '<(gtest_target_type)',
182 '../base/base.gyp:base',
183 '../base/base.gyp:test_support_perf',
184 '../content/content_shell_and_tests.gyp:test_support_content',
185 '../testing/gtest.gyp:gtest',
186 '../ui/compositor/compositor.gyp:compositor',
187 'components.gyp:visitedlink_browser',
193 'visitedlink/test/visitedlink_perftest.cc',
196 ['OS == "android" and gtest_target_type == "shared_library"', {
198 '../testing/android/native_test.gyp:native_test_native_code',
202 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
203 'msvs_disabled_warnings': [ 4267, ],
207 ['OS == "android" and gtest_target_type == "shared_library"', {
210 'target_name': 'components_unittests_apk',
213 'components_unittests',
216 'test_suite_name': 'components_unittests',
217 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)components_unittests<(SHARED_LIB_SUFFIX)',
219 'includes': [ '../build/apk_test.gypi' ],