Register external extension providers also for supervised users.
[chromium-blink-merge.git] / BUILD.gn
blobc2d5547047b5319cbefbda1a40b5e08e011f7ebe
1 # Copyright (c) 2013 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 # This is the root build file for GN. GN will start processing by loading this
6 # file, and recursively load all dependencies until all dependencies are either
7 # resolved or known not to exist (which will cause the build to fail). So if
8 # you add a new build file, there must be some path of dependencies from this
9 # file to your new one or GN won't know about it.
11 import("//build/config/features.gni")
12 import("//build/config/ui.gni")
14 if (is_android) {
15   import("//build/config/android/config.gni")
18 declare_args() {
19   # A list of extra dependencies to add to the root target. This allows a
20   # checkout to add additional targets without explicitly changing any checked-
21   # in files.
22   root_extra_deps = []
25 # The "gn_all" target should list every root target (target that
26 # nothing else depends on) built by both GN and GYP. One should
27 # be able to run 'ninja gn_all gn_only gn_groups' and then run
28 # 'ninja' a second time and have the second ninja invocation do nothing.
30 # In addition, the "gn_all" target serves to pull in all of the other
31 # build files needed for the build.
33 # TODO(GYP): make sure that the above is true and there are scripts run
34 # on the bots that enforce this.
36 group("gn_all") {
37   testonly = true
39   deps = [
40     "//base:base_unittests",
41     "//cc:cc_unittests",
42     "//chrome",
43     "//chrome/test:browser_tests",
44     "//chrome/test:interactive_ui_tests",
45     "//chrome/test:sync_integration_tests",
46     "//chrome/test:unit_tests",
47     "//chrome/test/chromedriver:chromedriver_unittests",
48     "//components:components_unittests",
49     "//content/shell:content_shell",
50     "//content/test:content_browsertests",
51     "//content/test:content_perftests",
52     "//content/test:content_unittests",
53     "//crypto:crypto_unittests",
54     "//extensions:extensions_browsertests",
55     "//extensions:extensions_unittests",
56     "//google_apis/gcm:gcm_unit_tests",
57     "//gpu:gpu_unittests",
58     "//ipc:ipc_tests",
59     "//ipc/mojo:ipc_mojo_unittests",
60     "//jingle:jingle_unittests",
61     "//media:media_unittests",
62     "//media/cast:cast_unittests",
63     "//mojo",
64     "//mojo/common:mojo_common_unittests",
65     "//net:net_unittests",
66     "//ppapi/examples",  # TODO(GYP): What's the GYP equivalent?
67     "//printing:printing_unittests",
68     "//skia:skia_unittests",
69     "//sql:sql_unittests",
70     "//sync:sync_unit_tests",
71     "//third_party/WebKit/public:blink_tests",
72     "//third_party/cacheinvalidation:cacheinvalidation_unittests",
73     "//third_party/codesighs",
74     "//third_party/mojo/src/mojo/edk/system:mojo_system_unittests",
75     "//third_party/mojo/src/mojo/edk/test:mojo_public_bindings_unittests",
76     "//third_party/mojo/src/mojo/edk/test:mojo_public_environment_unittests",
77     "//third_party/mojo/src/mojo/edk/test:mojo_public_system_unittests",
78     "//third_party/mojo/src/mojo/edk/test:mojo_public_utility_unittests",
79     "//third_party/pdfium/samples:pdfium_test",
80     "//third_party/smhasher:pmurhash",
81     "//tools/imagediff($host_toolchain)",
82     "//tools/gn",
83     "//tools/gn:gn_unittests",
84     "//tools/telemetry:bitmaptools($host_toolchain)",
85     "//ui/accessibility:accessibility_unittests",
86     "//ui/app_list:app_list_unittests",
87     "//ui/base:ui_base_unittests",
88     "//ui/display:display_unittests",
89     "//ui/events:events_unittests",
90     "//ui/gfx:gfx_unittests",
91     "//ui/touch_selection:ui_touch_selection_unittests",
92     "//url:url_unittests",
93   ]
95   deps += root_extra_deps
97   # TODO(GYP): Get this working on the mac?
98   if (enable_extensions && !is_mac) {
99     deps += [ "//extensions/shell:app_shell_unittests" ]
100   }
102   if (!is_win) {
103     deps += [ "//breakpad:symupload" ]
104   }
106   if (use_x11) {
107     deps += [ "//tools/xdisplaycheck" ]
108   }
110   if (toolkit_views) {
111     deps += [ "//ui/views:views_unittests" ]
112   }
114   if (use_aura) {
115     deps += [ "//ui/wm:wm_unittests" ]
116   }
118   if (use_ozone) {
119     deps += [
120       "//ui/ozone",
121       "//ui/ozone/demo",  # GN only
122     ]
123   }
125   if (is_win || is_mac || is_chromeos) {
126     # RLZ works on these platforms.
127     # TODO(GYP): Is this target needed, or pulled in automatically?
128     deps += [ "//rlz:rlz_lib" ]
129   }
131   if (is_android) {
132     deps += [
133       "//base/android/linker:chromium_android_linker",
134       "//build/android/gyp/test:hello_world",
135       "//build/android/rezip",
136       "//chrome/android:chrome_shell_apk",
137       "//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_apk",
138       "//tools/imagediff($host_toolchain)",
140       # TODO(GYP): Remove these when the components_unittests work.
141       "//components/history/core/test:test",
142       "//components/policy:policy_component_test_support",
143       "//components/policy:test_support",
144       "//components/rappor:test_support",
145       "//components/signin/core/browser:test_support",
146       "//components/sync_driver:test_support",
147       "//components/user_manager",
148       "//components/wallpaper",
149       "//content/shell/android:content_shell_apk",
151       # TODO(GYP): Are these needed, or will they be pulled in automatically?
152       "//third_party/android_tools:android_gcm_java",
153       "//third_party/android_tools:uiautomator_java",
154       "//third_party/android_tools:android_support_v13_java",
155       "//third_party/android_tools:android_support_v7_appcompat_java",
156       "//third_party/android_tools:android_support_v7_mediarouter_java",
157       "//third_party/mesa",
158       "//third_party/mockito:mockito_java",
159       "//third_party/openmax_dl/dl",
160       "//third_party/speex",
161       "//ui/android:ui_java",
163       # TODO(GYP): Are these needed?
164       "//chrome/test:test_support_unit",
165       "//third_party/smhasher:murmurhash3",
166       "//ui/message_center:test_support",
167     ]
168     deps -= [
169       "//breakpad:symupload",  # TODO(GYP) ??
170       "//chrome",  # TODO(GYP) ??
171       "//chrome/test:browser_tests",  # TODO(GYP) ??
172       "//chrome/test:interactive_ui_tests",  # TODO(GYP) ??
173       "//chrome/test:sync_integration_tests",  # TODO(GYP) ??
174       "//chrome/test:unit_tests",  # TODO(GYP)
176       # Chromedriver shouldn't be compiled on Android.
177       "//chrome/test/chromedriver:chromedriver_unittests",
178       "//extensions:extensions_browsertests",
179       "//extensions:extensions_unittests",
180       "//google_apis/gcm:gcm_unit_tests",
181       "//ipc:ipc_tests",  # TODO(GYP) ??
182       "//jingle:jingle_unittests",  # TODO(GYP) ??
183       "//net:net_unittests",
184       "//ppapi/examples",
185       "//third_party/pdfium/samples:pdfium_test",
186       "//tools/gn",
187       "//tools/gn:gn_unittests",
188       "//ui/app_list:app_list_unittests",
189       "//url:url_unittests",
190     ]
192     if (has_chrome_android_internal) {
193       deps += [ "//clank" ]  # TODO(GYP) ??
194     }
195   } else if (is_linux) {
196     deps += [
197       "//dbus:dbus_unittests",
198       "//sandbox/linux:sandbox_linux_unittests",
199     ]
200   } else if (is_mac) {
201     deps += [
202       "//third_party/apple_sample_code",
203       "//third_party/molokocacao",
204     ]
206     # TODO(GYP): Remove these when the targets below work and these
207     # are pulled in automatically.
208     deps += [
209       "//cc/blink",
210       "//components/ui/zoom:ui_zoom",
211       "//content",
212       "//content/test:test_support",
213       "//device/battery",
214       "//device/bluetooth",
215       "//device/nfc",
216       "//device/usb",
217       "//device/vibration",
218       "//media/blink",
219       "//pdf",
220       "//storage/browser",
221       "//third_party/brotli",
222       "//third_party/flac",
223       "//third_party/hunspell",
224       "//third_party/iccjpeg",
225       "//third_party/libphonenumber",
226       "//third_party/ots",
227       "//third_party/qcms",
228       "//third_party/smhasher:murmurhash3",
229       "//third_party/speex",
230       "//third_party/webrtc/system_wrappers",
231       "//ui/native_theme",
232       "//ui/snapshot",
233       "//ui/surface",
234     ]
236     # TODO(dpranke): These are as-yet untriaged but need at least the above.
237     deps -= [
238       "//chrome",  # TODO(GYP)
239       "//chrome/test:browser_tests",  # TODO(GYP)
240       "//chrome/test:interactive_ui_tests",  # TODO(GYP)
241       "//chrome/test:sync_integration_tests",  # TODO(GYP)
242       "//chrome/test:unit_tests",  # TODO(GYP)
243       "//components:components_unittests",  # TODO(GYP)
244       "//content/test:content_browsertests",  # TODO(GYP)
245       "//content/test:content_perftests",  # TODO(GYP)
246       "//content/test:content_unittests",  # TODO(GYP)
247       "//extensions:extensions_browsertests",  # TODO(GYP)
248       "//extensions:extensions_unittests",  # TODO(GYP)
249       "//net:net_unittests",  # TODO(GYP)
250       "//ui/app_list:app_list_unittests",  # TODO(GYP)
251       "//ui/gfx:gfx_unittests",  # TODO(GYP)
252     ]
253   } else if (is_win) {
254     deps += [ "//ui/metro_viewer" ]
255     deps -= [
256       "//crypto:crypto_unittests",  # TODO(GYP)
257       "//net:net_unittests",  # TODO(GYP)
258     ]
259   }
262 group("gn_only") {
263   deps = [
264     "//media/mojo",
265     # "//mojo/services/html_viewer:tests",  # TODO(GYP): Do we need this?
266   ]
269 if (is_linux) {
270   # This group corresponds to the list of tests run on the waterfall for
271   # desktop Linux GYP builds from testing/buildbot/chromium.linux.json. It's
272   # here to help track GYP -> GN conversion progress.
273   group("linux_default_tests") {
274     testonly = true
275     deps = [
276       # components_browsertests  TODO(GYP)
277       # device_unittests  TODO(GYP)
278       # nacl_loader_unittests  TODO(GYP)
279       # ppapi_unittests  TODO(GYP)
280       # remoting_unittests  TODO(GYP)
282       "//base:base_unittests",  # PASSES (*) 2/25/2015
283       "//cc:cc_unittests",  # PASSES 2/25/2015
284       "//chrome/test:browser_tests",
285       "//chrome/test:interactive_ui_tests",
286       "//chrome/test:sync_integration_tests",  # Crashes for brettw in GN and GYP.
287       "//chrome/test:unit_tests",  # PASSES 2/25/2015
288       "//chrome/test/chromedriver:chromedriver_unittests",  # PASSES 2/25/2015
289       "//components:components_unittests",  # PASSES 2/27/2015
290       "//content/test:content_browsertests",
291       "//content/test:content_unittests",  # PASSES 2/25/2015
292       "//crypto:crypto_unittests",  # PASSES 2/25/2015
293       "//dbus:dbus_unittests",  # PASSES 2/25/2015
294       "//extensions:extensions_browsertests",  # PASSES 2/25/2015
295       "//extensions:extensions_unittests",  # PASSES 2/25/2015
296       "//extensions/shell:app_shell_unittests",  # PASSES 2/25/2015
297       "//google_apis/gcm:gcm_unit_tests",  # PASSES 2/25/2015
298       "//google_apis:google_apis_unittests",  # PASSES 2/25/2015
299       "//gpu:gpu_unittests",  # PASSES 2/25/2015
300       "//ipc:ipc_tests",  # PASSES 2/25/2015
301       "//ipc/mojo:ipc_mojo_unittests",  # PASSES 2/25/2015
302       "//jingle:jingle_unittests",  # PASSES 2/25/2015
303       "//media/cast:cast_unittests",  # PASSES 2/25/2015
304       "//media:media_unittests",  # TODO(GYP) MidiManagerTest fails.
305       "//mojo/common:mojo_common_unittests",  # PASSES 2/25/2015
306       "//net:net_unittests",  # PASSES 2/25/2015
307       "//printing:printing_unittests",  # PASSES 2/25/2015
308       "//sandbox/linux:sandbox_linux_unittests",  # PASSES 2/25/2015
309       "//skia:skia_unittests",  # PASSES 2/25/2015
310       "//sql:sql_unittests",  # PASSES 2/25/2015
311       "//sync:sync_unit_tests",  # PASSES 2/25/2015
312       "//third_party/cacheinvalidation:cacheinvalidation_unittests",  # PASSES 2/25/2015
313       "//third_party/mojo/src/mojo/edk/system:mojo_system_unittests",  # PASSES 2/25/2015
314       "//third_party/mojo/src/mojo/edk/test:mojo_public_bindings_unittests",  # PASSES 2/25/2015
315       "//third_party/mojo/src/mojo/edk/test:mojo_public_environment_unittests",  # PASSES 2/25/2015
316       "//third_party/mojo/src/mojo/edk/test:mojo_public_system_unittests",  # PASSES 2/25/2015
317       "//ui/accessibility:accessibility_unittests",  # PASSES 2/25/2015
318       "//ui/app_list:app_list_unittests",  # PASSES 2/25/2015
319       "//ui/aura:aura_unittests",  # PASSES 2/25/2015
320       "//ui/base:ui_base_unittests",  # TODO(GYP) ResourceBundleTest.* fails.
321       "//ui/compositor:compositor_unittests",  # PASSES 2/25/2015
322       "//ui/display:display_unittests",  # PASSES 2/25/2015
323       "//ui/events:events_unittests",  # PASSES 2/25/2015
324       "//ui/gfx:gfx_unittests",  # PASSES 2/25/2015
325       "//ui/touch_selection:ui_touch_selection_unittests",  # PASSES 2/25/2015
326       "//ui/views:views_unittests",  # PASSES (*) 2/25/2015
327       "//ui/wm:wm_unittests",  # PASSES 2/25/2015
328       "//url:url_unittests",  # PASSES 2/25/2015
330       # Note:
331       # (*) Fails but failures match GYP build at time of testing.
332     ]
333   }