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 # TODO(rockot) bug 505926: Don't include chrome files from here.
6 # See chrome_browser_tests_extensions_sources below
7 import("//chrome/chrome_tests.gni")
8 import("//extensions/extensions.gni")
9 import("//testing/test.gni")
10 import("//tools/grit/grit_rule.gni")
11 import("//tools/grit/repack.gni")
13 assert(enable_extensions)
15 # GYP version: extensions/extensions_resources.gyp:extensions_resources
16 group("extensions_resources") {
18 ":extensions_browser_resources",
19 ":extensions_renderer_resources",
20 ":extensions_resources_grd",
24 # GYP version: extensions/extensions_resources.gyp:extensions_resources
25 # (extensions_resources action)
26 grit("extensions_resources_grd") {
27 source = "extensions_resources.grd"
29 "grit/extensions_resources.h",
30 "extensions_resources.pak",
34 # GYP version: extensions/extensions_resources.gyp:extensions_resources
35 # (extensions_browser_resources action)
36 grit("extensions_browser_resources") {
37 source = "browser/resources/extensions_browser_resources.grd"
39 "grit/extensions_browser_resources.h",
40 "grit/extensions_browser_resources_map.cc",
41 "grit/extensions_browser_resources_map.h",
42 "extensions_browser_resources_100_percent.pak",
43 "extensions_browser_resources_200_percent.pak",
47 "mojom_root=" + rebase_path(root_gen_dir),
51 # GYP version: extensions/extensions_resources.gyp:extensions_resources
52 # (extensions_renderer_resources action)
53 grit("extensions_renderer_resources") {
54 source = "renderer/resources/extensions_renderer_resources.grd"
56 "grit/extensions_renderer_resources.h",
57 "extensions_renderer_resources.pak",
61 "mojom_root=" + rebase_path(root_gen_dir),
65 "//chrome/browser/media/router:mojo_bindings__generator",
66 "//device/serial:serial_mojo__generator",
67 "//extensions/common:mojo__generator",
68 "//extensions/common/api:mojom__generator",
72 source_set("test_support") {
74 sources = rebase_path(extensions_gypi_values.extensions_test_support_sources,
78 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
79 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
82 ":extensions_resources",
84 "//base:prefs_test_support",
85 "//components/guest_view/browser:test_support",
86 "//components/pref_registry:test_support",
87 "//content/public/common",
88 "//content/test:test_support",
89 "//extensions/browser",
90 "//extensions/common",
91 "//extensions/common/api",
92 "//extensions/common/api:api_registration",
99 "//content/public/browser",
100 "//extensions/common/api/cast_channel:cast_channel_proto",
103 if (cld_version == 2) {
104 deps += [ "//third_party/cld_2:cld2_static" ]
108 # GYP version: //extensions/extensions.gyp:extensions_shell_and_test_pak
109 repack("shell_and_test_pak") {
111 "$root_gen_dir/blink/devtools_resources.pak",
112 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
113 "$root_gen_dir/blink/public/resources/blink_resources.pak",
114 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
115 "$root_gen_dir/content/content_resources.pak",
116 "$root_gen_dir/content/shell/shell_resources.pak",
117 "$root_gen_dir/extensions/extensions_browser_resources_100_percent.pak",
118 "$root_gen_dir/extensions/extensions_renderer_resources.pak",
119 "$root_gen_dir/extensions/extensions_resources.pak",
120 "$root_gen_dir/extensions/shell/app_shell_resources.pak",
121 "$root_gen_dir/extensions/strings/extensions_strings_en-US.pak",
122 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
123 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
124 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
127 output = "$root_out_dir/extensions_shell_and_test.pak"
130 ":extensions_resources",
131 "//content:resources",
132 "//content/app/strings",
133 "//content/browser/devtools:devtools_resources",
134 "//content/shell:resources",
135 "//extensions/shell:resources",
136 "//extensions/strings",
137 "//third_party/WebKit/public:image_resources",
138 "//third_party/WebKit/public:resources",
144 # TODO(GYP): Delete this after we've converted everything to GN.
145 # The _run targets exist only for compatibility w/ GYP.
146 group("extensions_unittests_run") {
149 ":extensions_unittests",
153 test("extensions_unittests") {
155 rebase_path(extensions_tests_gypi_values.extensions_unittests_sources,
160 # TODO(rockot): DisplayInfoProvider::Create() is only implemented in Chrome
161 # and app_shell. This is wrong.
162 "shell/browser/shell_display_info_provider.cc",
165 configs += [ "//build/config:precompiled_headers" ]
169 "//chrome/test/data/extensions/",
170 "$root_out_dir/extensions_shell_and_test.pak",
174 ":extensions_resources",
175 ":shell_and_test_pak",
178 "//base:prefs_test_support",
179 "//base/test:test_support",
180 "//components/keyed_service/content",
181 "//components/pref_registry:test_support",
182 "//components/user_prefs",
183 "//content/test:test_support",
184 "//device/bluetooth:mocks",
186 "//device/serial:test_support",
187 "//extensions/common",
188 "//extensions/common/api/cast_channel:cast_channel_proto",
189 "//extensions/renderer",
190 "//extensions/strings",
191 "//extensions/utility",
192 "//mojo/application/public/interfaces",
193 "//mojo/environment:chromium",
196 "//third_party/leveldatabase",
197 "//third_party/mojo/src/mojo/edk/js",
198 "//third_party/mojo/src/mojo/edk/system",
199 "//third_party/mojo/src/mojo/public/cpp/bindings",
202 data_deps = [ "//third_party/mesa:osmesa" ]
205 deps += [ "//base/allocator" ]
210 # TODO(rockot): There are two implementations of VpnServiceFactory, a
211 # stub in app_shell and a real one in Chrome. This is wrong.
212 "shell/browser/api/vpn_provider/vpn_service_factory.cc",
215 deps += [ "//chromeos:test_support" ]
219 # TODO(GYP): Delete this after we've converted everything to GN.
220 # The _run targets exist only for compatibility w/ GYP.
221 group("extensions_browsertests_run") {
224 ":extensions_browsertests",
228 test("extensions_browsertests") {
230 rebase_path(extensions_tests_gypi_values.extensions_browsertests_sources,
237 "//net/tools/testserver/",
238 "//third_party/pyftpdlib/",
239 "//third_party/pywebsocket/",
240 "//third_party/tlslite/",
241 "$root_out_dir/extensions_shell_and_test.pak",
244 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
248 "shell:app_shell_lib",
250 # TODO(yoz): find the right deps
252 "//base:prefs_test_support",
253 "//base/test:test_support",
254 "//components/storage_monitor:test_support",
255 "//content/test:test_support",
256 "//device/bluetooth:mocks",
257 "//device/usb:mocks",
258 "//mojo/environment:chromium",
261 "//third_party/mojo/src/mojo/edk/js",
262 "//third_party/mojo/src/mojo/edk/system",
263 "//third_party/mojo/src/mojo/public/cpp/bindings",
266 data_deps = [ "//third_party/mesa:osmesa" ]
269 deps += [ "//base/allocator" ]
271 if (target_cpu == "x86") {
273 # "$root_out_dir/wow_helper.exe" # TODO(GYP)
279 deps += [ "shell:app_shell" ] # Needed for App Shell.app's Helper.
283 # TODO(rockot) bug 505926: These should be moved to extensions_browsertests but have
284 # old dependencies on chrome files. The chrome dependencies should be removed
285 # and these moved to the extensions_browsertests target. Currently, we solve
286 # the problem by making this a source set and linking it into
287 # //chrome/test:browser_tests.
288 source_set("chrome_extensions_browsertests") {
290 sources = rebase_path(
291 chrome_tests_gypi_values.chrome_browser_tests_extensions_sources,
295 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
297 # These are the deps from browser_tests minus some internal Chrome ones that
298 # aren't allowed to be included here and that aren't needed.
303 "//base/test:test_support",
305 "//chrome/browser/resources:extension_resource_demo",
306 "//chrome/common/extensions/api",
308 "//components/autofill/content/browser:risk_proto",
309 "//components/autofill/content/browser/wallet:test_support",
310 "//components/autofill/content/renderer:test_support",
311 "//components/captive_portal:test_support",
312 "//components/dom_distiller/content:content_browser",
313 "//components/dom_distiller/core:test_support",
314 "//components/guest_view/browser:test_support",
315 "//components/resources",
316 "//components/strings",
317 "//components/translate/core/common",
318 "//components/user_manager:test_support",
320 "//crypto:test_support",
321 "//device/bluetooth:mocks",
322 "//device/serial:test_support",
323 "//extensions/common/api",
324 "//google_apis:test_support",
326 "//media/base:test_support",
327 "//media/cast:test_support",
329 "//net:test_support",
333 "//sync:test_support_sync_api",
337 "//third_party/cacheinvalidation",
339 "//third_party/leveldatabase",
340 "//third_party/libaddressinput",
341 "//third_party/libjingle",
342 "//third_party/safe_browsing:test_support",
343 "//third_party/WebKit/public:blink",
344 "//third_party/webrtc/modules/desktop_capture",
345 "//third_party/widevine/cdm:version_h",
346 "//ui/accessibility:test_support",
347 "//ui/base:test_support",
348 "//ui/compositor:test_support",
350 "//ui/web_dialogs:test_support",
355 # TODO(rockot) bug 505926: This should be deleted for the same reason as
356 # chrome_extensions_browsertests.
357 source_set("chrome_extensions_interactive_uitests") {
359 sources = rebase_path(
360 chrome_tests_gypi_values.chrome_interactive_ui_test_extensions_sources,
364 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
366 # These are the deps from interactive_uitests minus some internal Chrome
367 # ones that aren't allowed to be included here and that aren't needed.
371 "//chrome/browser/devtools",
373 "//chrome/test:test_support",
374 "//content/app/resources",
376 "//crypto:test_support",
377 "//google_apis:test_support",
379 "//net:net_resources",
380 "//net:test_support",
385 "//third_party/hunspell",
387 "//third_party/libpng",
388 "//third_party/zlib",
389 "//ui/base:test_support",
390 "//ui/resources:ui_test_pak",
391 "//ui/web_dialogs:test_support",