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