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 # GYP version: extensions/extensions_resources.gyp:extensions_resources
9 group("extensions_resources") {
11 ":extensions_browser_resources",
12 ":extensions_renderer_resources",
13 ":extensions_resources_grd",
17 # GYP version: extensions/extensions_resources.gyp:extensions_resources
18 # (extensions_resources action)
19 grit("extensions_resources_grd") {
20 source = "extensions_resources.grd"
22 "grit/extensions_resources.h",
23 "extensions_resources.pak",
27 # GYP version: extensions/extensions_resources.gyp:extensions_resources
28 # (extensions_browser_resources action)
29 grit("extensions_browser_resources") {
30 source = "browser/resources/extensions_browser_resources.grd"
32 "grit/extensions_browser_resources.h",
33 "grit/extensions_browser_resources_map.cc",
34 "grit/extensions_browser_resources_map.h",
35 "extensions_browser_resources_100_percent.pak",
36 "extensions_browser_resources_200_percent.pak",
38 grit_flags = [ "-E", "mojom_root=" + rebase_path(root_gen_dir) ]
41 # GYP version: extensions/extensions_resources.gyp:extensions_resources
42 # (extensions_renderer_resources action)
43 grit("extensions_renderer_resources") {
44 source = "renderer/resources/extensions_renderer_resources.grd"
46 "grit/extensions_renderer_resources.h",
47 "extensions_renderer_resources.pak",
49 grit_flags = [ "-E", "mojom_root=" + rebase_path(root_gen_dir) ]
50 if (enable_extensions) {
52 "//device/serial:serial_mojo",
57 source_set("test_support") {
60 "browser/api/dns/mock_host_resolver_creator.cc",
61 "browser/api/dns/mock_host_resolver_creator.h",
62 "browser/api/storage/settings_test_util.cc",
63 "browser/api/storage/settings_test_util.h",
64 "browser/api_test_utils.cc",
65 "browser/api_test_utils.h",
66 "browser/extensions_test.cc",
67 "browser/extensions_test.h",
68 "browser/mock_extension_system.cc",
69 "browser/mock_extension_system.h",
70 "browser/test_extensions_browser_client.cc",
71 "browser/test_extensions_browser_client.h",
72 "browser/test_management_policy.cc",
73 "browser/test_management_policy.h",
74 "browser/test_runtime_api_delegate.cc",
75 "browser/test_runtime_api_delegate.h",
76 "common/extension_builder.cc",
77 "common/extension_builder.h",
78 "common/manifest_test.cc",
79 "common/manifest_test.h",
80 "common/test_util.cc",
82 "common/value_builder.cc",
83 "common/value_builder.h",
84 "renderer/test_extensions_renderer_client.cc",
85 "renderer/test_extensions_renderer_client.h",
86 "test/extension_test_message_listener.cc",
87 "test/extension_test_message_listener.h",
88 "test/test_extensions_client.cc",
89 "test/test_extensions_client.h",
90 "test/test_permission_message_provider.cc",
91 "test/test_permission_message_provider.h",
95 ":extensions_resources",
97 "//extensions/browser",
98 "//extensions/common",
99 "//extensions/common/api",
100 "//extensions/common/api:api_registration",
101 "//net:test_support",
108 "/wd4267", # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
114 # GYP version: //extensions/extensions.gyp:extensions_shell_and_test_pak
115 repack("shell_and_test_pak") {
117 "$root_gen_dir/chrome/common_resources.pak",
118 "$root_gen_dir/chrome/extensions_api_resources.pak",
119 # TODO(jamescook): Extract the extension/app related resources
120 # from generated_resources_en-US.pak. http://crbug.com/397250
121 "$root_gen_dir/chrome/generated_resources_en-US.pak",
122 "$root_gen_dir/chrome/renderer_resources_100_percent.pak",
123 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
124 "$root_gen_dir/content/content_resources.pak",
125 "$root_gen_dir/content/shell/shell_resources.pak",
126 "$root_gen_dir/extensions/extensions_renderer_resources.pak",
127 "$root_gen_dir/extensions/extensions_resources.pak",
128 "$root_gen_dir/extensions/strings/extensions_strings_en-US.pak",
129 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
130 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
131 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
132 "$root_gen_dir/webkit/devtools_resources.pak",
135 output = "$root_out_dir/extensions_shell_and_test.pak"
138 ":extensions_resources",
139 # Need extension related resources in common_resources.pak and
140 # renderer_resources_100_percent.pak
141 "//chrome:resources",
142 # Need dev-tools related resources in shell_resources.pak and
143 # devtools_resources.pak.
144 "//content/browser/devtools:resources",
145 "//content/shell:resources",
146 "//content:resources",
147 "//extensions/strings",
153 # TODO(GYP): Enable this link errors are fixed.
154 # This gives a link error in web_modal that is very mysterious. The GYP build
155 # doesn't seem to pull in web_content_modal_dialog_manager.o since the build
156 # does not have a reference to CreateNativeWebModalManager but it still links.
157 # The GN build fails with this symbol being undefined.
160 output_name = "extensions_unittests"
163 "browser/admin_policy_unittest.cc",
164 "browser/api/api_resource_manager_unittest.cc",
165 "browser/api/declarative/declarative_rule_unittest.cc",
166 "browser/api/declarative/deduping_factory_unittest.cc",
167 "browser/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc",
168 "browser/api/declarative_webrequest/webrequest_condition_unittest.cc",
169 "browser/api/sockets_tcp/sockets_tcp_api_unittest.cc",
170 "browser/api/storage/settings_quota_unittest.cc",
171 "browser/api/storage/storage_api_unittest.cc",
172 "browser/api/storage/storage_frontend_unittest.cc",
173 "browser/api/web_request/form_data_parser_unittest.cc",
174 "browser/api/web_request/upload_data_presenter_unittest.cc",
175 "browser/api/web_request/web_request_time_tracker_unittest.cc",
176 "browser/computed_hashes_unittest.cc",
177 "browser/content_hash_tree_unittest.cc",
178 "browser/event_listener_map_unittest.cc",
179 "browser/event_router_unittest.cc",
180 "browser/api_unittest.cc",
181 "browser/api_unittest.h",
182 "browser/extension_pref_value_map_unittest.cc",
183 "browser/extension_registry_unittest.cc",
184 "browser/file_highlighter_unittest.cc",
185 "browser/file_reader_unittest.cc",
186 "browser/guest_view/guest_view_manager_unittest.cc",
187 "browser/image_loader_unittest.cc",
188 "browser/image_util_unittest.cc",
189 "browser/info_map_unittest.cc",
190 "browser/lazy_background_task_queue_unittest.cc",
191 "browser/management_policy_unittest.cc",
192 "browser/process_manager_unittest.cc",
193 "browser/process_map_unittest.cc",
194 "browser/quota_service_unittest.cc",
195 "browser/runtime_data_unittest.cc",
196 "browser/value_store/leveldb_value_store_unittest.cc",
197 "browser/value_store/testing_value_store_unittest.cc",
198 "browser/value_store/value_store_change_unittest.cc",
199 "browser/value_store/value_store_frontend_unittest.cc",
200 "browser/value_store/value_store_unittest.cc",
201 "browser/value_store/value_store_unittest.h",
202 "browser/verified_contents_unittest.cc",
203 "browser/warning_service_unittest.cc",
204 "common/api/sockets/sockets_manifest_permission_unittest.cc",
205 "common/csp_validator_unittest.cc",
206 "common/event_filter_unittest.cc",
207 "common/extension_l10n_util_unittest.cc",
208 "common/extension_resource_unittest.cc",
209 "common/extension_set_unittest.cc",
210 "common/file_util_unittest.cc",
211 "common/manifest_handler_unittest.cc",
212 "common/manifest_handlers/shared_module_manifest_unittest.cc",
213 "common/message_bundle_unittest.cc",
214 "common/one_shot_event_unittest.cc",
215 "common/permissions/manifest_permission_set_unittest.cc",
216 "common/stack_frame_unittest.cc",
217 "common/url_pattern_set_unittest.cc",
218 "common/url_pattern_unittest.cc",
219 "common/user_script_unittest.cc",
220 "renderer/activity_log_converter_strategy_unittest.cc",
221 "renderer/api/serial/data_receiver_unittest.cc",
222 "renderer/api/serial/data_sender_unittest.cc",
223 "renderer/api/serial/serial_api_unittest.cc",
224 "renderer/api_test_base.cc",
225 "renderer/api_test_base.h",
226 "renderer/api_test_base_unittest.cc",
227 "renderer/event_unittest.cc",
228 "renderer/json_schema_unittest.cc",
229 "renderer/messaging_utils_unittest.cc",
230 "renderer/module_system_test.cc",
231 "renderer/module_system_test.h",
232 "renderer/module_system_unittest.cc",
233 "renderer/safe_builtins_unittest.cc",
234 "renderer/script_context_set_unittest.cc",
235 "renderer/utils_unittest.cc",
236 "test/extensions_unittests_main.cc",
240 ":extensions_resources",
241 ":shell_and_test_pak",
244 "//base:prefs_test_support",
245 "//base/test:test_support",
246 "//components/keyed_service/content",
247 "//content/test:test_support",
249 "//device/serial:test_util",
250 "//extensions/common",
251 "//extensions/renderer",
252 "//extensions/strings",
253 "//mojo/environment:chromium",
254 "//mojo/public/cpp/bindings",
255 "//mojo/bindings/js",
259 "//third_party/leveldatabase",