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 "//content/public/common",
87 "//content/test:test_support",
88 "//extensions/browser",
89 "//extensions/common",
90 "//extensions/common/api",
91 "//extensions/common/api:api_registration",
98 "//content/public/browser",
99 "//extensions/common/api/cast_channel:cast_channel_proto",
103 # GYP version: //extensions/extensions.gyp:extensions_shell_and_test_pak
104 repack("shell_and_test_pak") {
106 "$root_gen_dir/blink/devtools_resources.pak",
107 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
108 "$root_gen_dir/blink/public/resources/blink_resources.pak",
109 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
110 "$root_gen_dir/content/content_resources.pak",
111 "$root_gen_dir/content/shell/shell_resources.pak",
112 "$root_gen_dir/extensions/extensions_browser_resources_100_percent.pak",
113 "$root_gen_dir/extensions/extensions_renderer_resources.pak",
114 "$root_gen_dir/extensions/extensions_resources.pak",
115 "$root_gen_dir/extensions/shell/app_shell_resources.pak",
116 "$root_gen_dir/extensions/strings/extensions_strings_en-US.pak",
117 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
118 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
119 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
122 output = "$root_out_dir/extensions_shell_and_test.pak"
125 ":extensions_resources",
126 "//content:resources",
127 "//content/app/strings",
128 "//content/browser/devtools:devtools_resources",
129 "//content/shell:resources",
130 "//extensions/shell:resources",
131 "//extensions/strings",
132 "//third_party/WebKit/public:image_resources",
133 "//third_party/WebKit/public:resources",
139 test("extensions_unittests") {
141 rebase_path(extensions_tests_gypi_values.extensions_unittests_sources,
146 # TODO(rockot): DisplayInfoProvider::Create() is only implemented in Chrome
147 # and app_shell. This is wrong.
148 "shell/browser/shell_display_info_provider.cc",
152 ":extensions_resources",
153 ":shell_and_test_pak",
156 "//base:prefs_test_support",
157 "//base/test:test_support",
158 "//components/keyed_service/content",
159 "//components/user_prefs",
160 "//content/test:test_support",
161 "//device/bluetooth:mocks",
163 "//device/serial:test_support",
164 "//extensions/common",
165 "//extensions/common/api/cast_channel:cast_channel_proto",
166 "//extensions/renderer",
167 "//extensions/strings",
168 "//extensions/utility",
169 "//mojo/application/public/interfaces",
170 "//mojo/environment:chromium",
173 "//third_party/leveldatabase",
174 "//third_party/mojo/src/mojo/edk/js",
175 "//third_party/mojo/src/mojo/edk/system",
176 "//third_party/mojo/src/mojo/public/cpp/bindings",
180 deps += [ "//base/allocator" ]
185 # TODO(rockot): There are two implementations of VpnServiceFactory, a
186 # stub in app_shell and a real one in Chrome. This is wrong.
187 "shell/browser/api/vpn_provider/vpn_service_factory.cc",
190 deps += [ "//chromeos:test_support" ]
194 test("extensions_browsertests") {
196 rebase_path(extensions_tests_gypi_values.extensions_browsertests_sources,
200 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
204 "shell:app_shell_lib",
206 # TODO(yoz): find the right deps
208 "//base:prefs_test_support",
209 "//base/test:test_support",
210 "//components/storage_monitor:test_support",
211 "//content/test:test_support",
212 "//device/bluetooth:mocks",
213 "//device/usb:mocks",
214 "//mojo/environment:chromium",
217 "//third_party/mojo/src/mojo/edk/js",
218 "//third_party/mojo/src/mojo/edk/system",
219 "//third_party/mojo/src/mojo/public/cpp/bindings",
223 deps += [ "//base/allocator" ]
227 deps += [ "shell:app_shell" ] # Needed for App Shell.app's Helper.
231 # TODO(rockot) bug 505926: These should be moved to extensions_browsertests but have
232 # old dependencies on chrome files. The chrome dependencies should be removed
233 # and these moved to the extensions_browsertests target. Currently, we solve
234 # the problem by making this a source set and linking it into
235 # //chrome/test:browser_tests.
236 source_set("chrome_extensions_browsertests") {
238 sources = rebase_path(
239 chrome_tests_gypi_values.chrome_browser_tests_extensions_sources,
243 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
245 # These are the deps from browser_tests minus some internal Chrome ones that
246 # aren't allowed to be included here and that aren't needed.
251 "//base/test:test_support",
253 "//chrome/browser/resources:extension_resource_demo",
254 "//chrome/common/extensions/api",
256 "//components/autofill/content/browser:risk_proto",
257 "//components/autofill/content/browser/wallet:test_support",
258 "//components/autofill/content/renderer:test_support",
259 "//components/captive_portal:test_support",
260 "//components/dom_distiller/content",
261 "//components/dom_distiller/core:test_support",
262 "//components/guest_view/browser:test_support",
263 "//components/resources",
264 "//components/strings",
265 "//components/translate/core/common",
266 "//components/user_manager:test_support",
268 "//crypto:test_support",
269 "//device/bluetooth:mocks",
270 "//device/serial:test_support",
271 "//extensions/common/api",
272 "//google_apis:test_support",
274 "//media/base:test_support",
275 "//media/cast:test_support",
277 "//net:test_support",
281 "//sync:test_support_sync_api",
285 "//third_party/cacheinvalidation",
287 "//third_party/leveldatabase",
288 "//third_party/libaddressinput",
289 "//third_party/libjingle",
290 "//third_party/safe_browsing:test_support",
291 "//third_party/WebKit/public:blink",
292 "//third_party/webrtc/modules/desktop_capture",
293 "//third_party/widevine/cdm:version_h",
294 "//ui/accessibility:test_support",
295 "//ui/base:test_support",
296 "//ui/compositor:test_support",
298 "//ui/web_dialogs:test_support",
303 # TODO(rockot) bug 505926: This should be deleted for the same reason as
304 # chrome_extensions_browsertests.
305 source_set("chrome_extensions_interactive_uitests") {
307 sources = rebase_path(
308 chrome_tests_gypi_values.chrome_interactive_ui_test_extensions_sources,
312 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
314 # These are the deps from interactive_uitests minus some internal Chrome
315 # ones that aren't allowed to be included here and that aren't needed.
319 "//chrome/browser/devtools",
321 "//chrome/test:test_support",
322 "//content/app/resources",
324 "//crypto:test_support",
325 "//google_apis:test_support",
327 "//net:net_resources",
328 "//net:test_support",
333 "//third_party/hunspell",
335 "//third_party/libpng",
336 "//third_party/zlib",
337 "//ui/base:test_support",
338 "//ui/resources:ui_test_pak",
339 "//ui/web_dialogs:test_support",