1 # Copyright 2014 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.
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//testing/test.gni")
8 import("//tools/grit/repack.gni")
10 # Collection of all components. You wouldn't link to this, but this is rather
11 # to reference the files so they can be compiled by the build system.
12 group("all_components") {
13 testonly = true # You shouldn't actually link to this.
14 visibility = [ "//:*" ] # Only for the root targets to bring in.
17 "//components/auto_login_parser",
18 "//components/autofill/content/browser",
19 "//components/autofill/content/common",
20 "//components/autofill/content/renderer",
21 "//components/bookmarks/browser",
22 "//components/bookmarks/common",
23 "//components/bookmarks/test",
24 "//components/captive_portal",
25 "//components/cdm/browser",
26 "//components/cdm/common",
27 "//components/cdm/renderer",
28 "//components/cloud_devices/common",
29 "//components/component_updater",
30 "//components/content_settings/core/browser",
31 "//components/content_settings/core/common",
32 "//components/crash/app",
33 "//components/crash/browser",
34 "//components/crx_file",
35 "//components/data_reduction_proxy/core/browser",
36 "//components/data_reduction_proxy/core/common",
37 "//components/device_event_log",
38 "//components/dom_distiller/core",
39 "//components/domain_reliability",
40 "//components/enhanced_bookmarks",
41 "//components/favicon/core",
42 "//components/favicon_base",
43 "//components/feedback",
44 "//components/gcm_driver",
45 "//components/google/core/browser",
46 "//components/history/content/browser",
47 "//components/history/core/browser",
48 "//components/history/core/common",
49 "//components/history/core/test",
50 "//components/infobars/core",
51 "//components/invalidation",
52 "//components/json_schema",
53 "//components/keyed_service/content",
54 "//components/language_usage_metrics",
55 "//components/leveldb_proto",
57 "//components/metrics",
58 "//components/navigation_interception",
59 "//components/navigation_metrics",
60 "//components/network_time",
61 "//components/omnibox",
63 "//components/os_crypt",
64 "//components/packed_ct_ev_whitelist",
65 "//components/pairing",
66 "//components/password_manager/content/browser",
67 "//components/password_manager/core/browser",
68 "//components/password_manager/core/common",
69 "//components/pdf/browser",
70 "//components/pdf/common",
71 "//components/pdf/renderer",
72 "//components/plugins/renderer",
73 "//components/policy",
75 "//components/precache/core",
76 "//components/precache/content",
77 "//components/pref_registry",
78 "//components/proximity_auth",
79 "//components/proximity_auth/cryptauth",
80 "//components/query_parser",
81 "//components/rappor",
82 "//components/renderer_context_menu",
83 "//components/resources:components_resources",
84 "//components/search",
85 "//components/search_engines",
86 "//components/search_provider_logos",
87 "//components/sessions:sessions_content",
88 "//components/signin/core/browser",
89 "//components/startup_metric_utils",
90 "//components/strings",
91 "//components/sync_driver",
92 "//components/tracing",
93 "//components/translate/content/browser",
94 "//components/translate/content/common",
95 "//components/translate/content/renderer",
96 "//components/translate/core/browser",
97 "//components/translate/core/common",
98 "//components/ui/zoom:ui_zoom",
99 "//components/update_client",
100 "//components/url_fixer",
101 "//components/url_matcher",
102 "//components/user_manager",
103 "//components/user_prefs",
104 "//components/variations",
105 "//components/visitedlink/browser",
106 "//components/visitedlink/common",
107 "//components/visitedlink/renderer",
108 "//components/wallpaper",
109 "//components/web_cache/browser",
110 "//components/web_cache/common",
111 "//components/web_cache/renderer",
112 "//components/web_modal",
113 "//components/web_resource",
114 "//components/webdata/common",
115 "//components/webui_generator",
117 "//components/wifi_sync",
120 if (!enable_configuration_policy) {
121 deps -= [ "//components/policy" ]
124 if (!is_win && !is_mac) {
125 deps -= [ "//components/wifi" ]
129 "//components/pairing",
130 "//components/wifi_sync",
135 "//components/history/content/browser",
136 "//components/keyed_service/content",
137 "//components/webui_generator",
141 if (!enable_plugins) {
143 "//components/pdf/browser",
144 "//components/pdf/common",
145 "//components/pdf/renderer",
151 "//components/autofill/content/browser", # Blocked on content/blink.
152 "//components/autofill/content/common", # Blocked on content.
153 "//components/autofill/content/renderer", # Blocked on content/blink.
154 "//components/crash/app", # Should work, needs checking.
155 "//components/crash/browser", # Should work, needs checking.
156 "//components/captive_portal", # Should work, needs checking.
157 "//components/cloud_devices/common", # Should work, needs checking.
158 "//components/cdm/browser", # Blocked on content.
159 "//components/cdm/common", # Blocked on content.
160 "//components/cdm/renderer", # Blocked on content.
161 "//components/data_reduction_proxy/core/browser", # Should work, needs checking.
162 "//components/data_reduction_proxy/core/common", # Should work, needs checking.
163 "//components/dom_distiller/core", # Blocked on content.
164 "//components/domain_reliability", # Blocked on content.
165 "//components/favicon_base", # Should work, needs checking.
166 "//components/favicon/core", # Blocked on keyed service.
167 "//components/feedback", # Blocked on content.
168 "//components/gcm_driver", # Should work, needs checking.
169 "//components/google/core/browser", # Should work, needs checking.
170 "//components/history/core/browser", # Should work, needs checking.
171 "//components/history/core/common", # Should work, needs checking.
172 "//components/history/core/test", # Should work, needs checking.
173 "//components/infobars/core", # Should work, needs checking.
174 "//components/invalidation", # Should work, needs checking.
175 "//components/json_schema", # Should work, needs checking.
176 "//components/keyed_service/content", # Blocked on content.
177 "//components/navigation_interception", # Blocked on content.
178 "//components/omnibox", # Should work, needs checking.
179 "//components/password_manager/content/browser", # Blocked on content.
180 "//components/password_manager/core/browser", # Should work, needs checking.
181 "//components/password_manager/core/common", # Should work, needs checking.
182 "//components/plugins/renderer", # Blocked on blink.
183 "//components/power", # Blocked on content.
184 "//components/policy", # Blocked on content (indirectly via autofill).
185 "//components/precache/content", # Blocked on content.
186 "//components/precache/core", # Should work, needs checking.
187 "//components/rappor", # Should work, needs checking.
188 "//components/renderer_context_menu", # Blocked on content.
189 "//components/search_engines", # Should work, needs checking.
190 "//components/search_provider_logos", # Should work, needs checking.
191 "//components/sessions:sessions_content", # Blocked on content.
192 "//components/signin/core/browser", # Should work, needs checking.
193 "//components/translate/content/browser", # Blocked on content.
194 "//components/translate/content/common", # Blocked on content.
195 "//components/translate/content/renderer", # Blocked on content.
196 "//components/user_prefs", # Blocked on content.
197 "//components/visitedlink/browser", # Blocked on content.
198 "//components/visitedlink/common", # Blocked on content.
199 "//components/visitedlink/renderer", # Blocked on blink
200 "//components/web_cache/browser", # Blocked on content and blink.
201 "//components/web_cache/renderer", # Blocked on content and blink.
202 "//components/web_modal", # Blocked on content.
206 if (!is_ios && !is_android) {
208 "//components/copresence",
209 "//components/storage_monitor",
214 deps += [ "//components/app_modal" ]
218 deps += [ "//components/constrained_window" ]
222 # To add a unit test to this target, make a "unit_test" source_set in your
223 # component (it's important to use a source_set instead of a static library or
224 # no tests will run) and add a reference here. You can add more than one unit
225 # test target if convenient.
226 test("components_unittests") {
228 "test/run_all_unittests.cc",
231 # Add only ":unit_tests" dependencies here. If your tests have dependencies
232 # (this would at least include the component itself), they should be on the
233 # test source set and not here.
235 "//components/auto_login_parser:unit_tests",
236 "//components/autofill/content/browser:unit_tests",
237 "//components/autofill/core/browser:unit_tests",
238 "//components/autofill/core/common:unit_tests",
239 "//components/bookmarks/browser:unit_tests",
240 "//components/captive_portal:unit_tests",
241 "//components/cloud_devices/common:unit_tests",
242 "//components/content_settings/core/browser:unit_tests",
243 "//components/content_settings/core/common:unit_tests",
244 "//components/crx_file:unit_tests",
245 "//components/data_reduction_proxy/content/browser:unit_tests",
246 "//components/data_reduction_proxy/core/browser:unit_tests",
247 "//components/data_reduction_proxy/core/common:unit_tests",
248 "//components/device_event_log:unit_tests",
249 "//components/dom_distiller/core:unit_tests",
250 "//components/domain_reliability:unit_tests",
251 "//components/favicon_base:unit_tests",
252 "//components/google/core/browser:unit_tests",
253 "//components/invalidation:unittests",
254 "//components/login:unit_tests",
255 "//components/metrics:unit_tests",
256 "//components/omnibox:unit_tests",
257 "//components/ownership:unit_tests",
258 "//components/packed_ct_ev_whitelist:unit_tests",
259 "//components/proximity_auth:unit_tests",
260 "//components/update_client:unit_tests",
261 "//components/variations:unit_tests",
262 "//components/web_resource:unit_tests",
263 "//components/webdata/common:unit_tests",
265 # These are the deps required by the code in this target.
267 "//base/test:test_support",
268 "//content/test:test_support",
271 data_deps = [ ":components_tests_pak" ]
273 # TODO(GYP) need this target.
274 #'breakpad/app/crash_keys_win_unittest.cc',
276 # Precache tests need these defines.
277 #configs += [ "//components/precache/core:precache_config" ]
280 # TODO(GYP) enable this as above.
281 #deps += [ "//components/constrained_window:unit_tests" ]
284 deps += [ "//components/browser_watcher:unit_tests" ]
288 repack("components_tests_pak") {
290 "$root_gen_dir/components/components_resources.pak",
291 "$root_gen_dir/components/strings/components_strings_en-US.pak",
292 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
293 "$root_gen_dir/ui/resources/webui_resources.pak",
294 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
295 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
298 output = "$root_out_dir/components_tests_resources.pak"
301 "//components/resources",
302 "//components/strings",
308 if (is_linux && !is_chromeos) {
309 # TODO(GYP): Figure out which of these work and are needed on other platforms.
311 # TODO(GYP): Finish me ...
312 # test("components_browsertests") {
314 # "autofill/content/browser/risk/fingerprint_browsertest.cc",
315 # "autofill/content/renderer/password_form_conversion_utils_browsertest.cc",
316 # "dom_distiller/content/distiller_page_web_contents_browsertest.cc",
317 # "password_manager/content/renderer/credential_manager_client_browsertest.cc",
320 # defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
323 # "//components/resources:components_resources",
324 # "//components/strings",
325 # "//components/autofill/content/browser",
326 # "//components/autofill/content/renderer",
327 # "//components/dom_distiller/content",
328 # "//components/dom_distiller/core",
329 # "//components/password_manager/content/renderer",
332 # "//content/public/common",
333 # "//content/public/renderer",
341 # # content_extractor_browsertest is a standalone content extraction tool built as
342 # # a MANUAL component_browsertest.
344 # "dom_distiller/standalone/content_extractor_browsertest.cc",
349 test("components_perftests") {
351 "visitedlink/test/visitedlink_perftest.cc",
354 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
355 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
359 "//base/test:test_support_perf",
361 "//content/test:test_support",
362 "//components/visitedlink/browser",