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("//tools/grit/grit_rule.gni")
6 import("//tools/grit/repack.gni")
8 assert(enable_extensions)
10 # GYP version: extensions/extensions_resources.gyp:extensions_resources
11 group("extensions_resources") {
13 ":extensions_browser_resources",
14 ":extensions_renderer_resources",
15 ":extensions_resources_grd",
19 # GYP version: extensions/extensions_resources.gyp:extensions_resources
20 # (extensions_resources action)
21 grit("extensions_resources_grd") {
22 source = "extensions_resources.grd"
24 "grit/extensions_resources.h",
25 "extensions_resources.pak",
29 # GYP version: extensions/extensions_resources.gyp:extensions_resources
30 # (extensions_browser_resources action)
31 grit("extensions_browser_resources") {
32 source = "browser/resources/extensions_browser_resources.grd"
34 "grit/extensions_browser_resources.h",
35 "grit/extensions_browser_resources_map.cc",
36 "grit/extensions_browser_resources_map.h",
37 "extensions_browser_resources_100_percent.pak",
38 "extensions_browser_resources_200_percent.pak",
42 "mojom_root=" + rebase_path(root_gen_dir),
46 # GYP version: extensions/extensions_resources.gyp:extensions_resources
47 # (extensions_renderer_resources action)
48 grit("extensions_renderer_resources") {
49 source = "renderer/resources/extensions_renderer_resources.grd"
51 "grit/extensions_renderer_resources.h",
52 "extensions_renderer_resources.pak",
56 "mojom_root=" + rebase_path(root_gen_dir),
60 "//device/serial:serial_mojo",
64 source_set("test_support") {
67 "browser/api/dns/mock_host_resolver_creator.cc",
68 "browser/api/dns/mock_host_resolver_creator.h",
69 "browser/api/storage/settings_test_util.cc",
70 "browser/api/storage/settings_test_util.h",
71 "browser/api_test_utils.cc",
72 "browser/api_test_utils.h",
73 "browser/api_unittest.cc",
74 "browser/api_unittest.h",
75 "browser/extensions_test.cc",
76 "browser/extensions_test.h",
77 "browser/mock_extension_system.cc",
78 "browser/mock_extension_system.h",
79 "browser/test_extensions_browser_client.cc",
80 "browser/test_extensions_browser_client.h",
81 "browser/test_management_policy.cc",
82 "browser/test_management_policy.h",
83 "browser/test_runtime_api_delegate.cc",
84 "browser/test_runtime_api_delegate.h",
85 "common/extension_builder.cc",
86 "common/extension_builder.h",
87 "common/manifest_test.cc",
88 "common/manifest_test.h",
89 "common/test_util.cc",
91 "common/value_builder.cc",
92 "common/value_builder.h",
93 "renderer/test_extensions_renderer_client.cc",
94 "renderer/test_extensions_renderer_client.h",
95 "test/extension_test_message_listener.cc",
96 "test/extension_test_message_listener.h",
97 "test/test_extensions_client.cc",
98 "test/test_extensions_client.h",
99 "test/test_permission_message_provider.cc",
100 "test/test_permission_message_provider.h",
101 "test/test_service_registration_manager.cc",
102 "test/test_service_registration_manager.h",
106 ":extensions_resources",
108 "//content/public/browser",
109 "//content/public/common",
110 "//content/test:test_support",
111 "//extensions/browser",
112 "//extensions/common",
113 "//extensions/common/api",
114 "//extensions/common/api:api_registration",
115 "//net:test_support",
121 cflags = [ "/wd4267" ] # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
125 # GYP version: //extensions/extensions.gyp:extensions_shell_and_test_pak
126 repack("shell_and_test_pak") {
128 "$root_gen_dir/blink/public/resources/blink_resources.pak",
129 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
130 "$root_gen_dir/content/content_resources.pak",
131 "$root_gen_dir/content/shell/shell_resources.pak",
132 "$root_gen_dir/extensions/extensions_browser_resources_100_percent.pak",
133 "$root_gen_dir/extensions/extensions_renderer_resources.pak",
134 "$root_gen_dir/extensions/extensions_resources.pak",
135 "$root_gen_dir/extensions/shell/app_shell_resources.pak",
136 "$root_gen_dir/extensions/strings/extensions_strings_en-US.pak",
137 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
138 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
139 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
140 "$root_gen_dir/webkit/devtools_resources.pak",
143 output = "$root_out_dir/extensions_shell_and_test.pak"
146 ":extensions_resources",
147 "//content:resources",
148 "//content/browser/devtools:devtools_resources",
149 "//content/shell:resources",
150 "//extensions/shell:resources",
151 "//extensions/strings",
152 "//third_party/WebKit/public:resources",
158 # TODO(GYP): Enable this link errors are fixed.
159 # This gives a link error in web_modal that is very mysterious. The GYP build
160 # doesn't seem to pull in web_content_modal_dialog_manager.o since the build
161 # does not have a reference to CreateNativeWebModalManager but it still links.
162 # The GN build fails with this symbol being undefined.
164 test("extensions_unittests") {
166 "browser/admin_policy_unittest.cc",
167 "browser/api/api_resource_manager_unittest.cc",
168 "browser/api/declarative/declarative_rule_unittest.cc",
169 "browser/api/declarative/deduping_factory_unittest.cc",
170 "browser/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc",
171 "browser/api/declarative_webrequest/webrequest_condition_unittest.cc",
172 "browser/api/sockets_tcp/sockets_tcp_api_unittest.cc",
173 "browser/api/storage/settings_quota_unittest.cc",
174 "browser/api/storage/storage_api_unittest.cc",
175 "browser/api/storage/storage_frontend_unittest.cc",
176 "browser/api/web_request/form_data_parser_unittest.cc",
177 "browser/api/web_request/upload_data_presenter_unittest.cc",
178 "browser/api/web_request/web_request_time_tracker_unittest.cc",
179 "browser/api/cast_channel/cast_auth_ica_unittest.cc",
180 "browser/api/cast_channel/cast_auth_util_unittest.cc",
181 "browser/api/cast_channel/cast_channel_api_unittest.cc",
182 "browser/api/cast_channel/cast_framer_unittest.cc",
183 "browser/api/cast_channel/cast_socket_unittest.cc",
184 "browser/api/cast_channel/cast_transport_unittest.cc",
185 "browser/api/cast_channel/logger_unittest.cc",
186 "browser/computed_hashes_unittest.cc",
187 "browser/content_hash_tree_unittest.cc",
188 "browser/event_listener_map_unittest.cc",
189 "browser/event_router_unittest.cc",
190 "browser/extension_pref_value_map_unittest.cc",
191 "browser/extension_registry_unittest.cc",
192 "browser/file_highlighter_unittest.cc",
193 "browser/file_reader_unittest.cc",
194 "browser/guest_view/guest_view_manager_unittest.cc",
195 "browser/image_loader_unittest.cc",
196 "browser/info_map_unittest.cc",
197 "browser/lazy_background_task_queue_unittest.cc",
198 "browser/management_policy_unittest.cc",
199 "browser/mojo/keep_alive_impl_unittest.cc",
200 "browser/process_manager_unittest.cc",
201 "browser/process_map_unittest.cc",
202 "browser/quota_service_unittest.cc",
203 "browser/runtime_data_unittest.cc",
204 "browser/value_store/leveldb_value_store_unittest.cc",
205 "browser/value_store/testing_value_store_unittest.cc",
206 "browser/value_store/value_store_change_unittest.cc",
207 "browser/value_store/value_store_frontend_unittest.cc",
208 "browser/value_store/value_store_unittest.cc",
209 "browser/value_store/value_store_unittest.h",
210 "browser/verified_contents_unittest.cc",
211 "browser/warning_service_unittest.cc",
212 "common/api/sockets/sockets_manifest_permission_unittest.cc",
213 "common/csp_validator_unittest.cc",
214 "common/event_filter_unittest.cc",
215 "common/extension_l10n_util_unittest.cc",
216 "common/extension_resource_unittest.cc",
217 "common/extension_set_unittest.cc",
218 "common/file_util_unittest.cc",
219 "common/image_util_unittest.cc",
220 "common/manifest_handler_unittest.cc",
221 "common/manifest_handlers/content_capabilities_manifest_unittest.cc",
222 "common/manifest_handlers/oauth2_manifest_unittest.cc",
223 "common/manifest_handlers/shared_module_manifest_unittest.cc",
224 "common/message_bundle_unittest.cc",
225 "common/one_shot_event_unittest.cc",
226 "common/permissions/manifest_permission_set_unittest.cc",
227 "common/stack_frame_unittest.cc",
228 "common/url_pattern_set_unittest.cc",
229 "common/url_pattern_unittest.cc",
230 "common/user_script_unittest.cc",
231 "renderer/activity_log_converter_strategy_unittest.cc",
232 "renderer/api/serial/data_receiver_unittest.cc",
233 "renderer/api/serial/data_sender_unittest.cc",
234 "renderer/api/serial/serial_api_unittest.cc",
235 "renderer/api_test_base.cc",
236 "renderer/api_test_base.h",
237 "renderer/api_test_base_unittest.cc",
238 "renderer/event_unittest.cc",
239 "renderer/json_schema_unittest.cc",
240 "renderer/messaging_utils_unittest.cc",
241 "renderer/module_system_test.cc",
242 "renderer/module_system_test.h",
243 "renderer/module_system_unittest.cc",
244 "renderer/mojo/keep_alive_client_unittest.cc",
245 "renderer/safe_builtins_unittest.cc",
246 "renderer/script_context_set_unittest.cc",
247 "renderer/utils_unittest.cc",
248 "test/extensions_unittests_main.cc",
252 ":extensions_resources",
253 ":shell_and_test_pak",
256 "//base:prefs_test_support",
257 "//base/test:test_support",
258 "//components/keyed_service/content",
259 "//content/test:test_support",
261 "//device/serial:test_util",
262 "//extensions/common",
263 "//extensions/renderer",
264 "//extensions/strings",
267 "//mojo/environment:chromium",
268 "//mojo/public/cpp/bindings",
271 "//third_party/leveldatabase",
275 deps += [ "//base/allocator" ]