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/managed",
24 "//components/bookmarks/test",
25 "//components/captive_portal",
26 "//components/cdm/browser",
27 "//components/cdm/common",
28 "//components/cdm/renderer",
29 "//components/cloud_devices/common",
30 "//components/chrome_apps",
31 "//components/component_updater",
32 "//components/content_settings/core/browser",
33 "//components/content_settings/core/common",
34 "//components/copresence",
35 "//components/crash/app",
36 "//components/crash/browser",
37 "//components/crx_file",
38 "//components/data_reduction_proxy/core/browser",
39 "//components/data_reduction_proxy/core/common",
40 "//components/device_event_log",
41 "//components/devtools_discovery",
42 "//components/devtools_http_handler",
43 "//components/devtools_service",
44 "//components/dom_distiller/core",
45 "//components/domain_reliability",
46 "//components/enhanced_bookmarks",
47 "//components/favicon/core",
48 "//components/favicon_base",
49 "//components/feedback",
50 "//components/gcm_driver",
51 "//components/gcm_driver/instance_id",
52 "//components/google/core/browser",
53 "//components/history/content/browser",
54 "//components/history/core/browser",
55 "//components/history/core/common",
56 "//components/history/core/test",
57 "//components/infobars/core",
58 "//components/invalidation",
59 "//components/json_schema",
60 "//components/keyed_service/content",
61 "//components/language_usage_metrics",
62 "//components/leveldb_proto",
64 "//components/metrics",
65 "//components/mime_util",
66 "//components/navigation_interception",
67 "//components/navigation_metrics",
68 "//components/network_time",
69 "//components/offline_pages",
70 "//components/omnibox",
72 "//components/os_crypt",
73 "//components/packed_ct_ev_whitelist",
74 "//components/pairing",
75 "//components/password_manager/content/browser",
76 "//components/password_manager/core/browser",
77 "//components/password_manager/core/common",
78 "//components/pdf/browser",
79 "//components/pdf/common",
80 "//components/pdf/renderer",
81 "//components/plugins/common",
82 "//components/plugins/renderer",
83 "//components/policy",
85 "//components/precache/core",
86 "//components/precache/content",
87 "//components/pref_registry",
88 "//components/query_parser",
89 "//components/rappor",
90 "//components/renderer_context_menu",
91 "//components/resources:components_resources",
92 "//components/search",
93 "//components/search_engines",
94 "//components/search_provider_logos",
95 "//components/sessions",
96 "//components/signin/core/browser",
97 "//components/startup_metric_utils",
98 "//components/strings",
99 "//components/sync_driver",
100 "//components/tracing",
101 "//components/translate/content/browser",
102 "//components/translate/content/common",
103 "//components/translate/content/renderer",
104 "//components/translate/core/browser",
105 "//components/translate/core/common",
106 "//components/ui/zoom:ui_zoom",
108 "//components/update_client",
109 "//components/url_fixer",
110 "//components/url_matcher",
111 "//components/user_manager",
112 "//components/user_prefs",
113 "//components/variations",
114 "//components/visitedlink/browser",
115 "//components/visitedlink/common",
116 "//components/visitedlink/renderer",
117 "//components/wallpaper",
118 "//components/web_cache/browser",
119 "//components/web_cache/common",
120 "//components/web_cache/renderer",
121 "//components/web_modal",
122 "//components/web_resource",
123 "//components/webcrypto",
124 "//components/webdata/common",
125 "//components/webui_generator",
127 "//components/wifi_sync",
130 if (!is_android && !is_ios) {
132 "//components/proximity_auth",
133 "//components/proximity_auth/cryptauth",
137 if (!enable_configuration_policy) {
138 deps -= [ "//components/policy" ]
141 if (!is_win && !is_mac) {
142 deps -= [ "//components/wifi" ]
146 "//components/pairing",
147 "//components/wifi_sync",
151 if (!is_chromeos || !enable_extensions) {
152 deps -= [ "//components/chrome_apps" ]
157 "//components/history/content/browser",
158 "//components/keyed_service/content",
159 "//components/webui_generator",
163 if (!enable_plugins) {
165 "//components/pdf/browser",
166 "//components/pdf/common",
167 "//components/pdf/renderer",
173 "//components/autofill/content/browser", # Blocked on content/blink.
174 "//components/autofill/content/common", # Blocked on content.
175 "//components/autofill/content/renderer", # Blocked on content/blink.
176 "//components/crash/app", # Should work, needs checking.
177 "//components/crash/browser", # Should work, needs checking.
178 "//components/captive_portal", # Should work, needs checking.
179 "//components/cloud_devices/common", # Should work, needs checking.
180 "//components/cdm/browser", # Blocked on content.
181 "//components/cdm/common", # Blocked on content.
182 "//components/cdm/renderer", # Blocked on content.
183 "//components/data_reduction_proxy/core/browser", # Should work, needs checking.
184 "//components/data_reduction_proxy/core/common", # Should work, needs checking.
185 "//components/dom_distiller/core", # Blocked on content.
186 "//components/domain_reliability", # Blocked on content.
187 "//components/favicon/core", # Blocked on keyed service.
188 "//components/favicon_base", # Should work, needs checking.
189 "//components/feedback", # Blocked on content.
190 "//components/gcm_driver", # Should work, needs checking.
191 "//components/gcm_driver/instance_id", # Should work, needs checking.
192 "//components/google/core/browser", # Should work, needs checking.
193 "//components/history/core/browser", # Should work, needs checking.
194 "//components/history/core/common", # Should work, needs checking.
195 "//components/history/core/test", # Should work, needs checking.
196 "//components/infobars/core", # Should work, needs checking.
197 "//components/invalidation", # Should work, needs checking.
198 "//components/json_schema", # Should work, needs checking.
199 "//components/keyed_service/content", # Blocked on content.
200 "//components/navigation_interception", # Blocked on content.
201 "//components/omnibox", # Should work, needs checking.
202 "//components/password_manager/content/browser", # Blocked on content.
203 "//components/password_manager/core/browser", # Should work, needs checking.
204 "//components/password_manager/core/common", # Should work, needs checking.
205 "//components/plugins/renderer", # Blocked on blink.
206 "//components/power", # Blocked on content.
207 "//components/policy", # Blocked on content (indirectly via autofill).
208 "//components/precache/content", # Blocked on content.
209 "//components/precache/core", # Should work, needs checking.
210 "//components/rappor", # Should work, needs checking.
211 "//components/renderer_context_menu", # Blocked on content.
212 "//components/search_engines", # Should work, needs checking.
213 "//components/search_provider_logos", # Should work, needs checking.
214 "//components/sessions", # Blocked on content.
215 "//components/signin/core/browser", # Should work, needs checking.
216 "//components/translate/content/browser", # Blocked on content.
217 "//components/translate/content/common", # Blocked on content.
218 "//components/translate/content/renderer", # Blocked on content.
219 "//components/user_prefs", # Blocked on content.
220 "//components/visitedlink/browser", # Blocked on content.
221 "//components/visitedlink/common", # Blocked on content.
222 "//components/visitedlink/renderer", # Blocked on blink
223 "//components/web_cache/browser", # Blocked on content and blink.
224 "//components/web_cache/renderer", # Blocked on content and blink.
225 "//components/web_modal", # Blocked on content.
229 if (!is_ios && !is_android) {
231 "//components/copresence",
232 "//components/storage_monitor",
238 "//components/app_modal",
239 "//components/browsing_data",
240 "//components/guest_view/browser",
241 "//components/guest_view/common",
242 "//components/guest_view/renderer",
243 "//components/safe_json_parser",
244 "//components/scheduler",
245 "//components/test_runner",
250 deps += [ "//components/constrained_window" ]
254 # To add a unit test to this target, make a "unit_test" source_set in your
255 # component (it's important to use a source_set instead of a static library or
256 # no tests will run) and add a reference here. You can add more than one unit
257 # test target if convenient.
258 test("components_unittests") {
260 "test/run_all_unittests.cc",
263 # Add only ":unit_tests" dependencies here. If your tests have dependencies
264 # (this would at least include the component itself), they should be on the
265 # test source set and not here.
267 "//components/auto_login_parser:unit_tests",
268 "//components/autofill/content/browser:unit_tests",
269 "//components/autofill/core/browser:unit_tests",
270 "//components/autofill/core/common:unit_tests",
271 "//components/bookmarks/browser:unit_tests",
272 "//components/bookmarks/managed:unit_tests",
273 "//components/captive_portal:unit_tests",
274 "//components/cloud_devices/common:unit_tests",
275 "//components/component_updater:unit_tests",
276 "//components/content_settings/core/browser:unit_tests",
277 "//components/content_settings/core/common:unit_tests",
278 "//components/crx_file:unit_tests",
279 "//components/data_reduction_proxy/content/browser:unit_tests",
280 "//components/data_reduction_proxy/core/browser:unit_tests",
281 "//components/data_reduction_proxy/core/common:unit_tests",
282 "//components/device_event_log:unit_tests",
283 "//components/devtools_http_handler:unit_tests",
284 "//components/dom_distiller/core:unit_tests",
285 "//components/domain_reliability:unit_tests",
286 "//components/favicon_base:unit_tests",
287 "//components/google/core/browser:unit_tests",
288 "//components/invalidation:unittests",
289 "//components/login:unit_tests",
290 "//components/metrics:unit_tests",
291 "//components/mime_util:unit_tests",
292 "//components/offline_pages:unit_tests",
293 "//components/omnibox:unit_tests",
294 "//components/packed_ct_ev_whitelist:unit_tests",
295 "//components/undo:unit_tests",
296 "//components/update_client:unit_tests",
297 "//components/variations:unit_tests",
298 "//components/web_resource:unit_tests",
299 "//components/webcrypto:unit_tests",
300 "//components/webdata/common:unit_tests",
302 # These are the deps required by the code in this target.
304 "//base/test:test_support",
305 "//content/test:test_support",
308 "//ui/resources:ui_test_pak",
312 isolate_file = "components_unittests.isolate"
315 data_deps = [ ":components_tests_pak" ]
318 deps += [ "//content/public/android:content_java" ]
321 if (!is_android && !is_ios) {
322 deps += [ "//components/proximity_auth:unit_tests" ]
326 deps += [ "//components/ownership:unit_tests" ]
329 # TODO(GYP) need this target.
330 #'breakpad/app/crash_keys_win_unittest.cc',
332 # Precache tests need these defines.
333 #configs += [ "//components/precache/core:precache_config" ]
336 # TODO(GYP) enable this as above.
337 #deps += [ "//components/constrained_window:unit_tests" ]
340 deps += [ "//components/browser_watcher:unit_tests" ]
343 deps -= [ "//components/devtools_http_handler:unit_tests" ]
347 deps += [ "//components/scheduler:unit_tests" ]
351 repack("components_tests_pak") {
353 "$root_gen_dir/components/components_resources.pak",
354 "$root_gen_dir/components/strings/components_strings_en-US.pak",
357 output = "$root_out_dir/components_tests_resources.pak"
360 "//components/resources",
361 "//components/strings",
365 test("components_browsertests") {
367 "autofill/content/browser/risk/fingerprint_browsertest.cc",
368 "autofill/content/renderer/password_form_conversion_utils_browsertest.cc",
369 "dom_distiller/content/distillable_page_utils_browsertest.cc",
370 "dom_distiller/content/distiller_page_web_contents_browsertest.cc",
371 "password_manager/content/renderer/credential_manager_client_browsertest.cc",
374 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
377 "autofill/content/browser",
378 "autofill/content/renderer",
379 "content_settings/core/common",
380 "dom_distiller/content",
381 "dom_distiller/core",
382 "dom_distiller/core:test_support",
383 "password_manager/content/browser",
384 "password_manager/content/common",
385 "password_manager/content/renderer",
388 "//base/test:test_support",
389 "//content/test:browsertest_support",
390 "//content/test:test_support",
391 "//device/bluetooth",
397 data_deps = [ ":components_tests_pak" ]
401 "test/android/browsertests_apk/components_browser_tests_android.cc",
402 "test/android/browsertests_apk/components_browser_tests_android.h",
403 "test/android/browsertests_apk/components_browser_tests_jni_onload.cc",
405 sources -= [ "autofill/content/browser/risk/fingerprint_browsertest.cc" ]
406 deps += [ "//testing/android/native_test:native_test_support" ]
408 isolate_file = "components_browsertests.isolate"
412 # content_extractor_browsertest is a standalone content extraction tool built as
413 # a MANUAL component_browsertest.
414 sources += [ "dom_distiller/standalone/content_extractor_browsertest.cc" ]
416 "pref_registry:test_support",
417 "//base:prefs_test_support",
422 test("components_perftests") {
424 "scheduler/child/task_queue_manager_perftest.cc",
425 "visitedlink/test/visitedlink_perftest.cc",
428 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
429 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
433 "//base/test:test_support_perf",
436 "//content/test:test_support",
437 "//components/visitedlink/browser",