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 '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',
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',
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'],
121 'autofill_core_common',
122 'navigation_interception',
123 'visitedlink_renderer',
126 ['OS == "android"', {
128 'web_modal/web_contents_modal_dialog_manager_unittest.cc',
131 'components.gyp:web_modal',
132 'components.gyp:web_modal_test_support',
135 ['OS == "android" and gtest_target_type == "shared_library"', {
137 '../testing/android/native_test.gyp:native_test_native_code',
140 ['OS=="win" and win_use_allocator_shim==1', {
142 '../base/allocator/allocator.gyp:allocator',
145 ['OS=="linux" and component=="shared_library" and linux_use_tcmalloc==1', {
147 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
150 'ldflags': ['-rdynamic'],
153 ['configuration_policy==1', {
155 'policy/core/common/schema_unittest.cc',
159 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
160 'msvs_disabled_warnings': [4267, ],
164 ['OS != "ios" and android_webview_build == 0', {
167 'target_name': 'components_perftests',
168 'type': '<(gtest_target_type)',
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',
181 'visitedlink/test/visitedlink_perftest.cc',
184 ['OS == "android" and gtest_target_type == "shared_library"', {
186 '../testing/android/native_test.gyp:native_test_native_code',
190 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
191 'msvs_disabled_warnings': [ 4267, ],
195 ['OS == "android" and gtest_target_type == "shared_library"', {
198 'target_name': 'components_unittests_apk',
201 'components_unittests',
204 'test_suite_name': 'components_unittests',
205 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)components_unittests<(SHARED_LIB_SUFFIX)',
207 'includes': [ '../build/apk_test.gypi' ],