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("//testing/test.gni")
6 import("//tools/grit/grit_rule.gni")
7 import("//tools/grit/repack.gni")
9 assert(enable_extensions)
11 # GYP version: extensions/extensions_resources.gyp:extensions_resources
12 group("extensions_resources") {
14 ":extensions_browser_resources",
15 ":extensions_renderer_resources",
16 ":extensions_resources_grd",
20 # GYP version: extensions/extensions_resources.gyp:extensions_resources
21 # (extensions_resources action)
22 grit("extensions_resources_grd") {
23 source = "extensions_resources.grd"
25 "grit/extensions_resources.h",
26 "extensions_resources.pak",
30 # GYP version: extensions/extensions_resources.gyp:extensions_resources
31 # (extensions_browser_resources action)
32 grit("extensions_browser_resources") {
33 source = "browser/resources/extensions_browser_resources.grd"
35 "grit/extensions_browser_resources.h",
36 "grit/extensions_browser_resources_map.cc",
37 "grit/extensions_browser_resources_map.h",
38 "extensions_browser_resources_100_percent.pak",
39 "extensions_browser_resources_200_percent.pak",
43 "mojom_root=" + rebase_path(root_gen_dir),
47 # GYP version: extensions/extensions_resources.gyp:extensions_resources
48 # (extensions_renderer_resources action)
49 grit("extensions_renderer_resources") {
50 source = "renderer/resources/extensions_renderer_resources.grd"
52 "grit/extensions_renderer_resources.h",
53 "extensions_renderer_resources.pak",
57 "mojom_root=" + rebase_path(root_gen_dir),
61 "//device/serial:serial_mojo",
62 "//extensions/common/api:mojom",
66 source_set("test_support") {
69 "browser/api/dns/mock_host_resolver_creator.cc",
70 "browser/api/dns/mock_host_resolver_creator.h",
71 "browser/api/storage/settings_test_util.cc",
72 "browser/api/storage/settings_test_util.h",
73 "browser/api_test_utils.cc",
74 "browser/api_test_utils.h",
75 "browser/api_unittest.cc",
76 "browser/api_unittest.h",
77 "browser/extensions_test.cc",
78 "browser/extensions_test.h",
79 "browser/guest_view/test_guest_view_manager.cc",
80 "browser/guest_view/test_guest_view_manager.h",
81 "browser/mock_extension_system.cc",
82 "browser/mock_extension_system.h",
83 "browser/test_extension_registry_observer.cc",
84 "browser/test_extension_registry_observer.h",
85 "browser/test_extensions_browser_client.cc",
86 "browser/test_extensions_browser_client.h",
87 "browser/test_management_policy.cc",
88 "browser/test_management_policy.h",
89 "browser/test_runtime_api_delegate.cc",
90 "browser/test_runtime_api_delegate.h",
91 "common/extension_builder.cc",
92 "common/extension_builder.h",
93 "common/manifest_test.cc",
94 "common/manifest_test.h",
95 "common/test_util.cc",
97 "common/value_builder.cc",
98 "common/value_builder.h",
99 "renderer/test_extensions_renderer_client.cc",
100 "renderer/test_extensions_renderer_client.h",
101 "test/extension_test_message_listener.cc",
102 "test/extension_test_message_listener.h",
103 "test/result_catcher.cc",
104 "test/result_catcher.h",
105 "test/test_extensions_client.cc",
106 "test/test_extensions_client.h",
107 "test/test_permission_message_provider.cc",
108 "test/test_permission_message_provider.h",
109 "test/test_service_registration_manager.cc",
110 "test/test_service_registration_manager.h",
114 ":extensions_resources",
116 "//content/public/browser",
117 "//content/public/common",
118 "//content/test:test_support",
119 "//extensions/browser",
120 "//extensions/common",
121 "//extensions/common/api",
122 "//extensions/common/api:api_registration",
123 "//net:test_support",
129 cflags = [ "/wd4267" ] # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
133 # GYP version: //extensions/extensions.gyp:extensions_shell_and_test_pak
134 repack("shell_and_test_pak") {
136 "$root_gen_dir/blink/public/resources/blink_resources.pak",
137 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
138 "$root_gen_dir/content/content_resources.pak",
139 "$root_gen_dir/content/shell/shell_resources.pak",
140 "$root_gen_dir/extensions/extensions_browser_resources_100_percent.pak",
141 "$root_gen_dir/extensions/extensions_renderer_resources.pak",
142 "$root_gen_dir/extensions/extensions_resources.pak",
143 "$root_gen_dir/extensions/shell/app_shell_resources.pak",
144 "$root_gen_dir/extensions/strings/extensions_strings_en-US.pak",
145 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
146 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
147 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
148 "$root_gen_dir/blink/devtools_resources.pak",
151 output = "$root_out_dir/extensions_shell_and_test.pak"
154 ":extensions_resources",
155 "//content:resources",
156 "//content/browser/devtools:devtools_resources",
157 "//content/shell:resources",
158 "//extensions/shell:resources",
159 "//extensions/strings",
160 "//third_party/WebKit/public:resources",
166 # TODO(GYP): Enable this link errors are fixed.
167 # This gives a link error in web_modal that is very mysterious. The GYP build
168 # doesn't seem to pull in web_content_modal_dialog_manager.o since the build
169 # does not have a reference to CreateNativeWebModalManager but it still links.
170 # The GN build fails with this symbol being undefined.
172 test("extensions_unittests") {
174 "browser/admin_policy_unittest.cc",
175 "browser/api/api_resource_manager_unittest.cc",
176 "browser/api/cast_channel/cast_auth_ica_unittest.cc",
177 "browser/api/cast_channel/cast_auth_util_unittest.cc",
178 "browser/api/cast_channel/cast_channel_api_unittest.cc",
179 "browser/api/cast_channel/cast_framer_unittest.cc",
180 "browser/api/cast_channel/cast_socket_unittest.cc",
181 "browser/api/cast_channel/cast_transport_unittest.cc",
182 "browser/api/cast_channel/keep_alive_delegate_unittest.cc",
183 "browser/api/cast_channel/logger_unittest.cc",
184 "browser/api/declarative/declarative_rule_unittest.cc",
185 "browser/api/declarative/deduping_factory_unittest.cc",
186 "browser/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc",
187 "browser/api/declarative_webrequest/webrequest_condition_unittest.cc",
188 "browser/api/idle/idle_api_unittest.cc",
189 "browser/api/sockets_tcp/sockets_tcp_api_unittest.cc",
190 "browser/api/sockets_udp/sockets_udp_api_unittest.cc",
191 "browser/api/storage/settings_quota_unittest.cc",
192 "browser/api/storage/storage_api_unittest.cc",
193 "browser/api/storage/storage_frontend_unittest.cc",
194 "browser/api/web_request/form_data_parser_unittest.cc",
195 "browser/api/web_request/upload_data_presenter_unittest.cc",
196 "browser/api/web_request/web_request_time_tracker_unittest.cc",
197 "browser/computed_hashes_unittest.cc",
198 "browser/content_hash_tree_unittest.cc",
199 "browser/event_listener_map_unittest.cc",
200 "browser/event_router_unittest.cc",
201 "browser/extension_pref_value_map_unittest.cc",
202 "browser/extension_registry_unittest.cc",
203 "browser/file_highlighter_unittest.cc",
204 "browser/file_reader_unittest.cc",
205 "browser/guest_view/guest_view_manager_unittest.cc",
206 "browser/image_loader_unittest.cc",
207 "browser/info_map_unittest.cc",
208 "browser/lazy_background_task_queue_unittest.cc",
209 "browser/management_policy_unittest.cc",
210 "browser/mojo/keep_alive_impl_unittest.cc",
211 "browser/process_manager_unittest.cc",
212 "browser/process_map_unittest.cc",
213 "browser/quota_service_unittest.cc",
214 "browser/runtime_data_unittest.cc",
215 "browser/value_store/leveldb_value_store_unittest.cc",
216 "browser/value_store/testing_value_store_unittest.cc",
217 "browser/value_store/value_store_change_unittest.cc",
218 "browser/value_store/value_store_frontend_unittest.cc",
219 "browser/value_store/value_store_unittest.cc",
220 "browser/value_store/value_store_unittest.h",
221 "browser/verified_contents_unittest.cc",
222 "browser/warning_service_unittest.cc",
223 "common/api/sockets/sockets_manifest_permission_unittest.cc",
224 "common/csp_validator_unittest.cc",
225 "common/event_filter_unittest.cc",
226 "common/extension_l10n_util_unittest.cc",
227 "common/extension_resource_unittest.cc",
228 "common/extension_set_unittest.cc",
229 "common/file_util_unittest.cc",
230 "common/image_util_unittest.cc",
231 "common/manifest_handlers/content_capabilities_manifest_unittest.cc",
232 "common/manifest_handlers/oauth2_manifest_unittest.cc",
233 "common/manifest_handlers/shared_module_manifest_unittest.cc",
234 "common/manifest_handler_unittest.cc",
235 "common/message_bundle_unittest.cc",
236 "common/one_shot_event_unittest.cc",
237 "common/permissions/manifest_permission_set_unittest.cc",
238 "common/stack_frame_unittest.cc",
239 "common/url_pattern_set_unittest.cc",
240 "common/url_pattern_unittest.cc",
241 "common/user_script_unittest.cc",
242 "renderer/activity_log_converter_strategy_unittest.cc",
243 "renderer/api/mojo_private/mojo_private_unittest.cc",
244 "renderer/api/serial/data_receiver_unittest.cc",
245 "renderer/api/serial/data_sender_unittest.cc",
246 "renderer/api/serial/serial_api_unittest.cc",
247 "renderer/api_test_base.cc",
248 "renderer/api_test_base.h",
249 "renderer/api_test_base_unittest.cc",
250 "renderer/event_unittest.cc",
251 "renderer/json_schema_unittest.cc",
252 "renderer/messaging_utils_unittest.cc",
253 "renderer/module_system_test.cc",
254 "renderer/module_system_test.h",
255 "renderer/module_system_unittest.cc",
256 "renderer/mojo/keep_alive_client_unittest.cc",
257 "renderer/safe_builtins_unittest.cc",
258 "renderer/script_context_set_unittest.cc",
259 "renderer/script_context_unittest.cc",
260 "renderer/utils_unittest.cc",
261 "test/extensions_unittests_main.cc",
262 "utility/unpacker_unittest.cc",
266 ":extensions_resources",
267 ":shell_and_test_pak",
270 "//base:prefs_test_support",
271 "//base/test:test_support",
272 "//components/keyed_service/content",
273 "//content/test:test_support",
275 "//device/serial:test_util",
276 "//extensions/common",
277 "//extensions/renderer",
278 "//extensions/strings",
279 "//mojo/environment:chromium",
282 "//third_party/leveldatabase",
283 "//third_party/mojo/src/mojo/edk/js",
284 "//third_party/mojo/src/mojo/edk/system",
285 "//third_party/mojo/src/mojo/public/cpp/bindings",
289 deps += [ "//base/allocator" ]
294 test("extensions_browsertests") {
296 "browser/api/audio/audio_apitest.cc",
297 "browser/api/dns/dns_apitest.cc",
298 "browser/api/hid/hid_apitest.cc",
299 "browser/api/socket/socket_apitest.cc",
300 "browser/api/sockets_tcp/sockets_tcp_apitest.cc",
301 "browser/api/sockets_udp/sockets_udp_apitest.cc",
302 "browser/api/system_cpu/system_cpu_apitest.cc",
303 "browser/api/system_display/system_display_apitest.cc",
304 "browser/api/system_memory/system_memory_apitest.cc",
305 "browser/api/system_network/system_network_apitest.cc",
306 "browser/api/system_storage/storage_api_test_util.cc",
307 "browser/api/system_storage/storage_api_test_util.h",
308 "browser/api/system_storage/system_storage_apitest.cc",
309 "browser/api/system_storage/system_storage_eject_apitest.cc",
310 "browser/api/usb/usb_apitest.cc",
311 "browser/guest_view/app_view/app_view_apitest.cc",
312 "browser/guest_view/web_view/web_view_apitest.h",
313 "browser/guest_view/web_view/web_view_apitest.cc",
314 "browser/guest_view/web_view/web_view_media_access_apitest.cc",
315 "browser/updater/update_service_browsertest.cc",
316 "shell/browser/geolocation/geolocation_apitest.cc",
317 "shell/browser/shell_browsertest.cc",
318 "shell/test/shell_apitest.cc",
319 "shell/test/shell_apitest.h",
320 "shell/test/shell_test.cc",
321 "shell/test/shell_test.h",
322 "shell/test/shell_test_launcher_delegate.cc",
323 "shell/test/shell_test_launcher_delegate.h",
324 "shell/test/shell_tests_main.cc",
327 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
331 "shell:app_shell_lib",
333 # TODO(yoz): find the right deps
335 "//base:prefs_test_support",
336 "//base/test:test_support",
337 "//components/storage_monitor:test_support",
338 "//content/test:test_support",
339 "//mojo/environment:chromium",
342 "//third_party/mojo/src/mojo/edk/js",
343 "//third_party/mojo/src/mojo/edk/system",
344 "//third_party/mojo/src/mojo/public/cpp/bindings",
348 deps += [ "//base/allocator" ]
352 deps += [ "shell:app_shell" ] # Needed for App Shell.app's Helper.