blob: b1e69d27a601735725701718146a837e2170080a [file] [log] [blame]
[email protected]824288842014-06-20 05:26:591# 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.
4
rockot5354cb9d2015-02-11 23:54:315import("//extensions/extensions.gni")
qsrfb5251d12015-01-21 15:57:226import("//testing/test.gni")
[email protected]824288842014-06-20 05:26:597import("//tools/grit/grit_rule.gni")
[email protected]5842610c2014-08-07 03:35:188import("//tools/grit/repack.gni")
[email protected]824288842014-06-20 05:26:599
thestigda556af2014-11-01 00:51:3110assert(enable_extensions)
11
[email protected]824288842014-06-20 05:26:5912# GYP version: extensions/extensions_resources.gyp:extensions_resources
13group("extensions_resources") {
14 deps = [
mukai4245dfe82014-09-05 17:40:5115 ":extensions_browser_resources",
[email protected]824288842014-06-20 05:26:5916 ":extensions_renderer_resources",
17 ":extensions_resources_grd",
18 ]
19}
20
21# GYP version: extensions/extensions_resources.gyp:extensions_resources
yoz774dcda2d2014-08-27 03:32:5822# (extensions_resources action)
[email protected]824288842014-06-20 05:26:5923grit("extensions_resources_grd") {
24 source = "extensions_resources.grd"
[email protected]b89c53842014-07-23 16:32:3225 outputs = [
26 "grit/extensions_resources.h",
27 "extensions_resources.pak",
28 ]
[email protected]824288842014-06-20 05:26:5929}
30
31# GYP version: extensions/extensions_resources.gyp:extensions_resources
mukai4245dfe82014-09-05 17:40:5132# (extensions_browser_resources action)
33grit("extensions_browser_resources") {
34 source = "browser/resources/extensions_browser_resources.grd"
35 outputs = [
36 "grit/extensions_browser_resources.h",
37 "grit/extensions_browser_resources_map.cc",
38 "grit/extensions_browser_resources_map.h",
39 "extensions_browser_resources_100_percent.pak",
40 "extensions_browser_resources_200_percent.pak",
41 ]
scottmg22d2efa2014-12-03 19:21:2242 grit_flags = [
43 "-E",
44 "mojom_root=" + rebase_path(root_gen_dir),
45 ]
mukai4245dfe82014-09-05 17:40:5146}
47
48# GYP version: extensions/extensions_resources.gyp:extensions_resources
49# (extensions_renderer_resources action)
[email protected]824288842014-06-20 05:26:5950grit("extensions_renderer_resources") {
51 source = "renderer/resources/extensions_renderer_resources.grd"
[email protected]b89c53842014-07-23 16:32:3252 outputs = [
53 "grit/extensions_renderer_resources.h",
54 "extensions_renderer_resources.pak",
55 ]
scottmg22d2efa2014-12-03 19:21:2256 grit_flags = [
57 "-E",
58 "mojom_root=" + rebase_path(root_gen_dir),
59 ]
cjhopman11a68cb2014-10-13 22:47:5460
cjhopman11a68cb2014-10-13 22:47:5461 deps = [
62 "//device/serial:serial_mojo",
vchigrin61944ae2015-01-30 23:51:3263 "//extensions/common:mojo",
sammcc5eb526d2015-01-23 01:21:5464 "//extensions/common/api:mojom",
cjhopman11a68cb2014-10-13 22:47:5465 ]
[email protected]824288842014-06-20 05:26:5966}
[email protected]016eeef82014-08-01 20:37:4367
68source_set("test_support") {
Brett Wilson8f80ad0b2014-09-08 19:50:2469 testonly = true
rockot5354cb9d2015-02-11 23:54:3170 sources = rebase_path(extensions_gypi_values.extensions_test_support_sources,
71 ".",
72 "//extensions")
[email protected]016eeef82014-08-01 20:37:4373
74 deps = [
[email protected]bc8a0922014-08-20 00:51:0875 ":extensions_resources",
[email protected]016eeef82014-08-01 20:37:4376 "//base",
rockot466cf202015-02-13 23:03:3677 "//base:prefs_test_support",
jamescook62117922014-10-20 14:35:1178 "//content/public/common",
79 "//content/test:test_support",
[email protected]016eeef82014-08-01 20:37:4380 "//extensions/browser",
81 "//extensions/common",
82 "//extensions/common/api",
yoz774dcda2d2014-08-27 03:32:5883 "//extensions/common/api:api_registration",
[email protected]016eeef82014-08-01 20:37:4384 "//net:test_support",
[email protected]5842610c2014-08-07 03:35:1885 "//testing/gmock",
[email protected]016eeef82014-08-01 20:37:4386 "//testing/gtest",
87 ]
88
jamescookf112ccd2015-02-06 18:06:3389 public_deps = [
rockot466cf202015-02-13 23:03:3690 "//content/public/browser",
jamescookf112ccd2015-02-06 18:06:3391 "//extensions/common/api/cast_channel:cast_channel_proto",
92 ]
93
[email protected]016eeef82014-08-01 20:37:4394 if (is_win) {
scottmg22d2efa2014-12-03 19:21:2295 cflags = [ "/wd4267" ] # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
[email protected]016eeef82014-08-01 20:37:4396 }
97}
[email protected]5842610c2014-08-07 03:35:1898
[email protected]5842610c2014-08-07 03:35:1899# GYP version: //extensions/extensions.gyp:extensions_shell_and_test_pak
100repack("shell_and_test_pak") {
101 sources = [
mukaiefb3eb02014-11-11 23:38:00102 "$root_gen_dir/blink/public/resources/blink_resources.pak",
lfg0330a7e2014-09-12 22:58:28103 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
[email protected]5842610c2014-08-07 03:35:18104 "$root_gen_dir/content/content_resources.pak",
105 "$root_gen_dir/content/shell/shell_resources.pak",
mukaiefb3eb02014-11-11 23:38:00106 "$root_gen_dir/extensions/extensions_browser_resources_100_percent.pak",
[email protected]5842610c2014-08-07 03:35:18107 "$root_gen_dir/extensions/extensions_renderer_resources.pak",
108 "$root_gen_dir/extensions/extensions_resources.pak",
jamescook62117922014-10-20 14:35:11109 "$root_gen_dir/extensions/shell/app_shell_resources.pak",
[email protected]5842610c2014-08-07 03:35:18110 "$root_gen_dir/extensions/strings/extensions_strings_en-US.pak",
111 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
112 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
113 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
vivek.vg77816a12014-12-18 14:28:20114 "$root_gen_dir/blink/devtools_resources.pak",
[email protected]5842610c2014-08-07 03:35:18115 ]
116
117 output = "$root_out_dir/extensions_shell_and_test.pak"
118
119 deps = [
120 ":extensions_resources",
[email protected]5842610c2014-08-07 03:35:18121 "//content:resources",
mukaiefb3eb02014-11-11 23:38:00122 "//content/browser/devtools:devtools_resources",
123 "//content/shell:resources",
jamescook62117922014-10-20 14:35:11124 "//extensions/shell:resources",
[email protected]5842610c2014-08-07 03:35:18125 "//extensions/strings",
mukaiefb3eb02014-11-11 23:38:00126 "//third_party/WebKit/public:resources",
[email protected]5842610c2014-08-07 03:35:18127 "//ui/resources",
128 "//ui/strings",
129 ]
130}
131
jamescookf112ccd2015-02-06 18:06:33132test("extensions_unittests") {
rockot5354cb9d2015-02-11 23:54:31133 sources =
134 rebase_path(extensions_tests_gypi_values.extensions_unittests_sources,
135 ".",
136 "//extensions")
scottmg22d2efa2014-12-03 19:21:22137
rockot5354cb9d2015-02-11 23:54:31138 sources += [
jamescookf112ccd2015-02-06 18:06:33139 # TODO(rockot): DisplayInfoProvider::Create() is only implemented in Chrome
140 # and app_shell. This is wrong.
141 "shell/browser/shell_display_info_provider.cc",
scottmg22d2efa2014-12-03 19:21:22142
jamescookf112ccd2015-02-06 18:06:33143 # TODO(rockot): See above, but the header is in //components.
144 "shell/browser/shell_web_contents_modal_dialog_manager.cc",
145 ]
146
147 deps = [
148 ":extensions_resources",
149 ":shell_and_test_pak",
150 ":test_support",
151 "//base",
152 "//base:prefs_test_support",
153 "//base/test:test_support",
154 "//components/keyed_service/content",
155 "//components/user_prefs",
156 "//content/test:test_support",
rockot5354cb9d2015-02-11 23:54:31157 "//device/bluetooth:mocks",
jamescookf112ccd2015-02-06 18:06:33158 "//device/serial",
159 "//device/serial:test_support",
160 "//extensions/common",
161 "//extensions/common/api/cast_channel:cast_channel_proto",
162 "//extensions/renderer",
163 "//extensions/strings",
164 "//extensions/utility",
165 "//mojo/environment:chromium",
166 "//testing/gmock",
167 "//testing/gtest",
168 "//third_party/leveldatabase",
169 "//third_party/mojo/src/mojo/edk/js",
170 "//third_party/mojo/src/mojo/edk/system",
171 "//third_party/mojo/src/mojo/public/cpp/bindings",
172 "//third_party/mojo/src/mojo/public/interfaces/application",
173 ]
174
175 if (is_win) {
176 deps += [ "//base/allocator" ]
177 }
178
179 if (is_chromeos) {
180 sources += [
181 # TODO(rockot): There are two implementations of VpnServiceFactory, a
182 # stub in app_shell and a real one in Chrome. This is wrong.
183 "shell/browser/api/vpn_provider/vpn_service_factory.cc",
184 ]
rockot5354cb9d2015-02-11 23:54:31185
186 deps += [ "//chromeos:test_support" ]
[email protected]5842610c2014-08-07 03:35:18187 }
188}
rockotea9df2a2015-01-22 20:26:36189
190test("extensions_browsertests") {
rockot5354cb9d2015-02-11 23:54:31191 sources =
192 rebase_path(extensions_tests_gypi_values.extensions_browsertests_sources,
193 ".",
194 "//extensions")
rockotea9df2a2015-01-22 20:26:36195
196 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
197
198 deps = [
199 ":test_support",
200 "shell:app_shell_lib",
201
202 # TODO(yoz): find the right deps
203 "//base",
204 "//base:prefs_test_support",
205 "//base/test:test_support",
206 "//components/storage_monitor:test_support",
207 "//content/test:test_support",
jamescook49fec4b42015-02-06 19:57:19208 "//device/bluetooth:mocks",
rockotea9df2a2015-01-22 20:26:36209 "//mojo/environment:chromium",
210 "//testing/gmock",
211 "//testing/gtest",
212 "//third_party/mojo/src/mojo/edk/js",
213 "//third_party/mojo/src/mojo/edk/system",
214 "//third_party/mojo/src/mojo/public/cpp/bindings",
215 ]
216
217 if (is_win) {
218 deps += [ "//base/allocator" ]
219 }
220
221 if (is_mac) {
222 deps += [ "shell:app_shell" ] # Needed for App Shell.app's Helper.
223 }
224}