Revert 228211 "Move renderer plugin code into a new component."
[chromium-blink-merge.git] / components / components_tests.gypi
blob675b2b534a5e97c17778e7b4e69edfa2466390e3
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.
6   'conditions': [
7     ['android_webview_build == 0', {
8       'targets': [
9         {
10           'target_name': 'components_unittests',
11           'type': '<(gtest_target_type)',
12           'sources': [
13             'autofill/core/common/form_data_unittest.cc',
14             'autofill/core/common/form_field_data_unittest.cc',
15             'auto_login_parser/auto_login_parser_unittest.cc',
16             'browser_context_keyed_service/browser_context_dependency_manager_unittest.cc',
17             'browser_context_keyed_service/dependency_graph_unittest.cc',
18             'dom_distiller/core/distiller_url_fetcher_unittest.cc',
19             'dom_distiller/core/dom_distiller_database_unittest.cc',
20             'dom_distiller/core/dom_distiller_store_unittest.cc',
21             'dom_distiller/core/article_entry_unittest.cc',
22             'json_schema/json_schema_validator_unittest.cc',
23             'json_schema/json_schema_validator_unittest_base.cc',
24             'json_schema/json_schema_validator_unittest_base.h',
25             'navigation_interception/intercept_navigation_resource_throttle_unittest.cc',
26             'sessions/serialized_navigation_entry_unittest.cc',
27             'test/run_all_unittests.cc',
28             'translate/common/translate_metrics_unittest.cc',
29             'translate/common/translate_util_unittest.cc',
30             'translate/language_detection/language_detection_util_unittest.cc',
31             # TODO(asvitkine): These should be tested on iOS too.
32             'variations/entropy_provider_unittest.cc',
33             'variations/metrics_util_unittest.cc',
34             'variations/variations_associated_data_unittest.cc',
35             'variations/variations_seed_processor_unittest.cc',
36             'visitedlink/test/visitedlink_unittest.cc',
37             'webdata/encryptor/encryptor_password_mac_unittest.cc',
38             'webdata/encryptor/encryptor_unittest.cc',
39             'web_modal/web_contents_modal_dialog_manager_unittest.cc',
40           ],
41           'include_dirs': [
42             '..',
43           ],
44           'dependencies': [
45             '../base/base.gyp:test_support_base',
46             '../sync/sync.gyp:sync',
47             '../testing/gmock.gyp:gmock',
48             '../testing/gtest.gyp:gtest',
50             # Dependencies of autofill
51             'autofill_core_common',
53             # Dependencies of auto_login_parser
54             'auto_login_parser',
56             # Dependencies of browser_context_keyed_service
57             'browser_context_keyed_service',
59             # Dependencies of dom_distiller
60             'distilled_page_proto',
61             'dom_distiller_core',
63             # Dependencies of encryptor
64             'encryptor',
66             # Dependencies of json_schema
67             'json_schema',
69             # Dependencies of intercept_navigation_resource_throttle_unittest.cc
70             '../content/content.gyp:test_support_content',
71             '../skia/skia.gyp:skia',
72             'navigation_interception',
74             # Dependencies of policy
75             'policy_component',
77             # Dependencies of sessions
78             '../third_party/protobuf/protobuf.gyp:protobuf_lite',
79             'sessions',
80             'sessions_test_support',
82             # Dependencies of translate.
83             'translate_common',
84             'translate_language_detection',
86             # Dependencies of variations
87             'variations',
89             # Dependencies of visitedlink
90             'visitedlink_browser',
91             'visitedlink_renderer',
92             '../content/content_resources.gyp:content_resources',
94             'web_modal',
95           ],
96           'conditions': [
97             ['OS == "ios"', {
98               'sources/': [
99                 ['exclude', '\\.cc$'],
100                 ['include', '^test/run_all_unittests\\.cc$'],
101                 # TODO(ios): Include files here as they are made to work, see
102                 # http://crbug.com/303011.
103                 # TODO(asvitkine): Bring up varations/ unittests on iOS.
104                 ['include', '^dom_distiller'],
105                 ['include', '^translate'],
106               ],
107               'dependencies!': [
108                 'autofill_core_common',
109                 'navigation_interception',
110                 'visitedlink_renderer',
111               ],
112             }],
113             ['OS == "android"', {
114               'sources!': [
115                 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
116               ],
117               'dependencies!': [
118                 'web_modal',
119               ],
120             }],
121             ['OS == "android" and gtest_target_type == "shared_library"', {
122               'dependencies': [
123                 '../testing/android/native_test.gyp:native_test_native_code',
124               ]
125             }],
126             ['OS=="win" and win_use_allocator_shim==1', {
127               'dependencies': [
128                 '../base/allocator/allocator.gyp:allocator',
129               ],
130             }],
131             ['OS=="linux" and component=="shared_library" and linux_use_tcmalloc==1', {
132             'dependencies': [
133                 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
134             ],
135             'link_settings': {
136                 'ldflags': ['-rdynamic'],
137             },
138             }],
139             ['configuration_policy==1', {
140               'sources': [
141                 'policy/core/common/schema_unittest.cc',
142               ],
143             }],
144           ],
145           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
146           'msvs_disabled_warnings': [4267, ],
147         },
148       ],
149     }],
150     ['OS != "ios" and android_webview_build == 0', {
151       'targets': [
152         {
153           'target_name': 'components_perftests',
154           'type': '<(gtest_target_type)',
155           'dependencies': [
156             '../base/base.gyp:base',
157             '../base/base.gyp:test_support_perf',
158             '../content/content.gyp:test_support_content',
159             '../testing/gtest.gyp:gtest',
160             '../ui/compositor/compositor.gyp:compositor',
161             'visitedlink_browser',
162           ],
163          'include_dirs': [
164            '..',
165          ],
166          'sources': [
167            'visitedlink/test/visitedlink_perftest.cc',
168          ],
169          'conditions': [
170            ['OS == "android" and gtest_target_type == "shared_library"', {
171              'dependencies': [
172                '../testing/android/native_test.gyp:native_test_native_code',
173              ],
174            }],
175          ],
176          # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
177          'msvs_disabled_warnings': [ 4267, ],
178         },
179       ],
180       'conditions': [
181         ['OS == "android" and gtest_target_type == "shared_library"', {
182           'targets': [
183             {
184               'target_name': 'components_unittests_apk',
185               'type': 'none',
186               'dependencies': [
187                 'components_unittests',
188               ],
189               'variables': {
190                 'test_suite_name': 'components_unittests',
191                 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)components_unittests<(SHARED_LIB_SUFFIX)',
192               },
193               'includes': [ '../build/apk_test.gypi' ],
194             },
195           ],
196         }],
197       ],
198     }],
199   ],