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