summaryrefslogtreecommitdiffstats
path: root/components/BUILD.gn
blob: eaa056e989cc571a586794648fa6fc6981b24100 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/features.gni")
import("//build/config/ui.gni")

# Collection of all components. You wouldn't link to this, but this is rather
# to reference the files so they can be compiled by the build system.
group("all_components") {
  testonly = true  # You shouldn't actually link to this.
  visibility = [ "//:*" ]  # Only for the root targets to bring in.

  deps = [
    "//components/auto_login_parser",
    "//components/autofill/content/browser",
    "//components/autofill/content/common",
    "//components/autofill/content/renderer",
    "//components/bookmarks/browser",
    "//components/bookmarks/common",
    "//components/bookmarks/test",
    "//components/captive_portal",
    "//components/cdm/browser",
    "//components/cdm/common",
    "//components/cdm/renderer",
    "//components/cloud_devices/common",
    "//components/component_updater",
    "//components/content_settings/core/browser",
    "//components/content_settings/core/common",
    "//components/copresence_sockets",
    "//components/crash/app",
    "//components/crash/browser",
    "//components/crx_file",
    "//components/data_reduction_proxy/core/browser",
    "//components/data_reduction_proxy/core/common",
    "//components/dom_distiller/core",
    "//components/domain_reliability",
    "//components/enhanced_bookmarks",
    "//components/favicon/core",
    "//components/favicon_base",
    "//components/feedback",
    "//components/gcm_driver",
    "//components/google/core/browser",
    "//components/history/core/browser",
    "//components/history/core/common",
    "//components/history/core/test",
    "//components/infobars/core",
    "//components/infobars/test:test_support",
    "//components/invalidation",
    "//components/json_schema",
    "//components/keyed_service/content",
    "//components/language_usage_metrics",
    "//components/leveldb_proto",
    "//components/login",
    "//components/metrics",
    "//components/navigation_interception",
    "//components/navigation_metrics",
    "//components/network_time",
    "//components/omaha_client",
    "//components/omnibox",
    "//components/onc",
    "//components/os_crypt",
    "//components/pairing",
    "//components/password_manager/content/browser",
    "//components/password_manager/core/browser",
    "//components/password_manager/core/common",
    "//components/pdf/browser",
    "//components/pdf/common",
    "//components/pdf/renderer",
    "//components/plugins/renderer",
    "//components/policy",
    "//components/power",
    "//components/precache/core",
    "//components/precache/content",
    "//components/pref_registry",
    "//components/proximity_auth",
    "//components/proximity_auth/cryptauth",
    "//components/query_parser",
    "//components/rappor",
    "//components/renderer_context_menu",
    "//components/resources:components_resources",
    "//components/search",
    "//components/search_engines",
    "//components/search_provider_logos",
    "//components/sessions:sessions_content",
    "//components/signin/core/browser",
    "//components/startup_metric_utils",
    "//components/strings",
    "//components/sync_driver",
    "//components/tracing",
    "//components/translate/content/browser",
    "//components/translate/content/common",
    "//components/translate/content/renderer",
    "//components/translate/core/browser",
    "//components/translate/core/common",
    "//components/url_fixer",
    "//components/url_matcher",
    "//components/user_manager",
    "//components/user_prefs",
    "//components/variations",
    "//components/visitedlink/browser",
    "//components/visitedlink/common",
    "//components/visitedlink/renderer",
    "//components/web_cache/browser",
    "//components/web_cache/common",
    "//components/web_cache/renderer",
    "//components/web_modal",
    "//components/webdata/common",
    "//components/web_resource",
    "//components/wifi",
  ]

  if (!is_win && !is_mac) {
    deps -= [ "//components/wifi" ]
  }
  if (!is_chromeos) {
    deps -= [ "//components/pairing" ]
  }
  if (is_ios) {
    deps -= [
      "//components/keyed_service/content",
      "//components/copresence_sockets",
    ]
  }

  if (!enable_plugins) {
    deps -= [
      "//components/pdf/browser",
      "//components/pdf/common",
      "//components/pdf/renderer",
    ]
  }

  if (is_android) {
    deps -= [
      "//components/autofill/content/browser",  # Blocked on content/blink.
      "//components/autofill/content/common",  # Blocked on content.
      "//components/autofill/content/renderer",  # Blocked on content/blink.
      "//components/crash/app",  # Should work, needs checking.
      "//components/crash/browser",  # Should work, needs checking.
      "//components/captive_portal",  # Should work, needs checking.
      "//components/cloud_devices/common",  # Should work, needs checking.
      "//components/cdm/browser",  # Blocked on content.
      "//components/cdm/common",  # Blocked on content.
      "//components/cdm/renderer",  # Blocked on content.
      "//components/data_reduction_proxy/core/browser",  # Should work, needs checking.
      "//components/data_reduction_proxy/core/common",  # Should work, needs checking.
      "//components/dom_distiller/core",  # Blocked on content.
      "//components/domain_reliability",  # Blocked on content.
      "//components/favicon_base",  # Should work, needs checking.
      "//components/favicon/core",  # Blocked on keyed service.
      "//components/feedback",  # Blocked on content.
      "//components/gcm_driver",  # Should work, needs checking.
      "//components/google/core/browser",  # Should work, needs checking.
      "//components/history/core/browser",  # Should work, needs checking.
      "//components/history/core/common",  # Should work, needs checking.
      "//components/history/core/test",  # Should work, needs checking.
      "//components/infobars/core",  # Should work, needs checking.
      "//components/infobars/test:test_support",  # Should work, needs checking.
      "//components/invalidation",  # Should work, needs checking.
      "//components/json_schema",  # Should work, needs checking.
      "//components/keyed_service/content",  # Blocked on content.
      "//components/navigation_interception",  # Blocked on content.
      "//components/omnibox",  # Should work, needs checking.
      "//components/password_manager/content/browser",  # Blocked on content.
      "//components/password_manager/core/browser",  # Should work, needs checking.
      "//components/password_manager/core/common",  # Should work, needs checking.
      "//components/plugins/renderer",  # Blocked on blink.
      "//components/power",  # Blocked on content.
      "//components/policy",  # Blocked on content (indirectly via autofill).
      "//components/precache/content",  # Blocked on content.
      "//components/precache/core",  # Should work, needs checking.
      "//components/rappor",  # Should work, needs checking.
      "//components/renderer_context_menu",  # Blocked on content.
      "//components/search_engines",  # Should work, needs checking.
      "//components/search_provider_logos",  # Should work, needs checking.
      "//components/sessions:sessions_content",  # Blocked on content.
      "//components/signin/core/browser",  # Should work, needs checking.
      "//components/translate/content/browser",  # Blocked on content.
      "//components/translate/content/common",  # Blocked on content.
      "//components/translate/content/renderer",  # Blocked on content.
      "//components/user_prefs",  # Blocked on content.
      "//components/visitedlink/browser",  # Blocked on content.
      "//components/visitedlink/common",  # Blocked on content.
      "//components/visitedlink/renderer",  # Blocked on blink
      "//components/web_cache/browser",  # Blocked on content and blink.
      "//components/web_cache/renderer",  # Blocked on content and blink.
      "//components/web_modal",  # Blocked on content.
    ]
  }

  if (!is_ios && !is_android) {
    deps += [
      "//components/copresence",
      "//components/storage_monitor",
    ]
  }

  if (!is_ios) {
    deps += [ "//components/app_modal" ]
  }

  if (toolkit_views) {
    deps += [ "//components/constrained_window" ]
  }
}

# To add a unit test to this target, make a "unit_test" source_set in your
# component (it's important to use a source_set instead of a static library or
# no tests will run) and add a reference here. You can add more than one unit
# test target if convenient.
test("components_unittests") {
  sources = [
    "test/run_all_unittests.cc",
  ]

  # Add only ":unit_tests" dependencies here. If your tests have dependencies
  # (this would at least include the component itself), they should be on the
  # test source set and not here.
  deps = [
    "//components/auto_login_parser:unit_tests",
    # TODO(GYP) enable the rest of these. Some will likely work, but some
    # require extra dependencies to link properly.
    #"//components/autofill/content/browser:unit_tests",
    #"//components/autofill/core/browser:unit_tests",
    #"//components/autofill/core/common:unit_tests",
    #"//components/bookmarks/browser:unit_tests",
    #"//components/captive_portal:unit_tests",
    #"//components/cloud_devices/common:unit_tests",
    #"//components/component_updater:unit_tests",
    #"//components/content_settings/core/browser:unit_tests",
    "//components/content_settings/core/common:unit_tests",
    #"//components/crx_file:unit_tests",
    #"//components/data_reduction_proxy/core/browser:unit_tests",
    #"//components/data_reduction_proxy/core/common:unit_tests",
    #"//components/dom_distiller/core:unit_tests",
    #"//components/domain_reliability:unit_tests",
    #"//components/login:unit_tests",
    #"//components/metrics:unit_tests",
    #"//components/omnibox:unit_tests",
    #"//components/ownership:unit_tests",
    #"//components/proximity_auth:unit_tests",
    #"//components/variations:unit_tests",
    #"//components/web_resource:unit_tests",

    # These are the deps required by the code in this target.
    "//base",
    "//base/test:test_support",
    "//content/test:test_support",
    "//ui/base",
  ]

  # TODO(GYP) need this target.
  #'breakpad/app/crash_keys_win_unittest.cc',

  # Precache tests need these defines.
  #configs += [ "//components/precache/core:precache_config" ]

  if (toolkit_views) {
    # TODO(GYP) enable this as above.
    #deps += [ "//components/constrained_window:unit_tests" ]
  }
}