blob: 3e173aa9923c1177214ad7aab30891df9b7414d1 [file] [log] [blame]
sdefresneaa7c1cf2015-10-22 00:41:111# Copyright 2015 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
sdefresne61384ea2016-06-23 09:26:175import("//ios/build/config.gni")
sdefresneaa7c1cf2015-10-22 00:41:116import("//ios/web/js_compile.gni")
Colin Blundell285e5bb2017-07-04 09:10:327import("//mojo/public/tools/bindings/mojom.gni")
eugenebut395c54ea2016-05-19 23:16:578import("//testing/test.gni")
9import("//tools/grit/grit_rule.gni")
sdefresneaa7c1cf2015-10-22 00:41:1110
sdefresnee51457b2016-12-15 09:11:4411group("all_tests") {
12 testonly = true
13 deps = [
14 ":ios_web_inttests",
15 ":ios_web_unittests",
16 ]
17}
18
[email protected]c5229642017-08-21 13:34:5219source_set("web") {
mattm2791788c2017-05-11 19:17:0020 public_deps = [
Colin Blundell285e5bb2017-07-04 09:10:3221 ":service_names",
Eugene But85cab06b2017-10-30 21:58:1222
23 # TODO(crbug.com/616244): Remove private files from public dependencies.
24 "//ios/web/navigation:core",
25 "//ios/web/net",
Eugene Butb5fc5d302017-10-17 03:07:4026 "//ios/web/public",
Eugene Butd08f91c2017-11-21 23:14:1027 "//ios/web/public/download",
Eugene But85cab06b2017-10-30 21:58:1228 "//ios/web/web_state:web_state_impl_header",
29 "//ios/web/web_state/ui",
30 "//ios/web/web_state/ui:wk_web_view_configuration_provider",
31 "//ios/web/webui",
mattm2791788c2017-05-11 19:17:0032 "//net",
33 ]
34
sdefresneaa7c1cf2015-10-22 00:41:1135 deps = [
agrieved7a71c882015-11-20 19:53:2836 ":core",
37 ":js_resources",
Danyao Wang0c4719892017-10-05 20:51:3538 ":navigation_resources",
eugenebut395c54ea2016-05-19 23:16:5739 ":resources",
sdefresneaa7c1cf2015-10-22 00:41:1140 "//base",
Eugene But3dd6bfe2017-11-20 21:01:4741 "//ios/web/download",
Eugene But85cab06b2017-10-30 21:58:1242 "//ios/web/interstitials",
43 "//ios/web/navigation",
44 "//ios/web/net",
Eugene Butb5fc5d302017-10-17 03:07:4045 "//ios/web/public",
Eugene But5964f7a2018-06-05 15:09:5446 "//ios/web/web_state",
47 "//ios/web/web_state:error_translation_util",
48 "//ios/web/web_state:navigation_context",
Eugene But85cab06b2017-10-30 21:58:1249 "//ios/web/web_state:web_view_internal_creation_util",
Colin Blundell285e5bb2017-07-04 09:10:3250 "//services/catalog/public/cpp",
John Abd-El-Malek07a93f12018-02-08 19:28:2551 "//services/network:network_service",
Ken Rockot54311e62018-02-10 19:01:5252 "//services/network/public/mojom",
Colin Blundell285e5bb2017-07-04 09:10:3253 "//services/service_manager",
54 "//services/service_manager/embedder",
Colin Blundell285e5bb2017-07-04 09:10:3255 "//services/service_manager/runner/common",
sdefresneaa7c1cf2015-10-22 00:41:1156 ]
57
58 sources = [
sdefresneaa7c1cf2015-10-22 00:41:1159 "browser_state.mm",
sdefresneaa7c1cf2015-10-22 00:41:1160 "browser_url_rewriter_impl.h",
sdefresne69aeefd82016-02-17 13:28:5261 "browser_url_rewriter_impl.mm",
Eugene Butb5fc5d302017-10-17 03:07:4062 "crw_navigation_item_storage.mm",
Danyao Wang34da6ff2017-10-30 15:16:5663 "features.mm",
sdefresneaa7c1cf2015-10-22 00:41:1164 "load_committed_details.cc",
Maks Orlovichc71746a62018-04-27 21:52:1765 "network_context_owner.cc",
Colin Blundell285e5bb2017-07-04 09:10:3266 "service_manager_connection_impl.cc",
67 "service_manager_connection_impl.h",
68 "service_manager_context.h",
69 "service_manager_context.mm",
stkhapugineb706fb2016-08-23 13:17:1170 "url_scheme_util.mm",
71 "url_util.cc",
Eugene Butb5fc5d302017-10-17 03:07:4072 "web_client.mm",
stkhapugineb706fb2016-08-23 13:17:1173 "web_kit_constants.cc",
74 "web_thread_impl.cc",
75 "web_thread_impl.h",
76 "web_view_creation_util.mm",
77 ]
78
79 libs = [ "WebKit.framework" ]
80
81 configs += [ "//build/config/compiler:enable_arc" ]
82}
83
Colin Blundell285e5bb2017-07-04 09:10:3284mojom("service_names") {
85 sources = [
86 "public/service_names.mojom",
87 ]
88}
89
sdefresneaa7c1cf2015-10-22 00:41:1190source_set("core") {
stkhapugin2c99fc22016-11-22 15:27:5491 configs += [ "//build/config/compiler:enable_arc" ]
sdefresneaa7c1cf2015-10-22 00:41:1192 deps = [
93 "//base",
sdefresne5f39d8e62016-05-18 19:27:3794 "//url",
sdefresneaa7c1cf2015-10-22 00:41:1195 ]
96
97 sources = [
stkhapugin2c99fc22016-11-22 15:27:5498 "history_state_util.cc",
sdefresneaa7c1cf2015-10-22 00:41:1199 "history_state_util.h",
sdefresneaa7c1cf2015-10-22 00:41:11100 ]
101}
102
baxleyd7fe10f2016-05-18 14:39:52103source_set("earl_grey_test_support") {
baxley7a047d22017-06-02 17:47:55104 configs += [ "//build/config/compiler:enable_arc" ]
baxleyd7fe10f2016-05-18 14:39:52105 testonly = true
106
107 deps = [
sdefresne5f39d8e62016-05-18 19:27:37108 ":web",
109 "//base",
110 "//base/test:test_support",
sdefresnee93bb1df2016-07-22 13:41:01111 "//ios/testing/earl_grey:earl_grey_support",
Yuke Liaob9714c32017-10-19 07:09:10112 "//ios/third_party/earl_grey:earl_grey+link",
Eugene But85cab06b2017-10-30 21:58:12113 "//ios/web/interstitials",
baxley66cc96f02017-05-31 18:13:32114 "//ios/web/public/test",
sdefresne037962f2017-01-05 08:51:39115 "//net",
baxleyd7fe10f2016-05-18 14:39:52116 ]
117
118 sources = [
eugenebut525bd4bb2016-09-14 17:32:48119 "public/test/earl_grey/js_test_util.h",
120 "public/test/earl_grey/js_test_util.mm",
marqc73c7be2016-08-31 17:23:52121 "public/test/earl_grey/web_view_actions.h",
122 "public/test/earl_grey/web_view_actions.mm",
baxleyd7fe10f2016-05-18 14:39:52123 "public/test/earl_grey/web_view_matchers.h",
124 "public/test/earl_grey/web_view_matchers.mm",
baxleyd7fe10f2016-05-18 14:39:52125 ]
126}
127
sdefresne1cab6512016-06-04 17:08:37128source_set("run_all_unittests") {
129 testonly = true
130 sources = [
131 "test/run_all_unittests.cc",
132 ]
133 deps = [
sdefresne1cab6512016-06-04 17:08:37134 "//base",
135 "//base/test:test_support",
baxley66cc96f02017-05-31 18:13:32136 "//ios/web/public/test",
137 "//ios/web/public/test/http_server",
Ken Rockot9b26bc52018-07-04 19:57:49138 "//mojo/core/embedder",
sdefresne1cab6512016-06-04 17:08:37139 ]
140}
141
sdefresned2bbd872016-04-13 17:46:01142bundle_data("ios_web_unittests_bundle_data") {
143 testonly = true
144 sources = [
145 "test/data/chrome.html",
146 "test/data/testbadpass.pkpass",
147 "test/data/testfavicon.png",
148 "test/data/testpass.pkpass",
149 ]
150 outputs = [
151 "{{bundle_resources_dir}}/{{source_root_relative_dir}}/" +
152 "{{source_file_part}}",
153 ]
154}
155
sdefresneaa7c1cf2015-10-22 00:41:11156test("ios_web_unittests") {
157 deps = [
Sylvain Defresne2d66e422017-06-16 12:43:06158 # Ensure all required data are present in the bundle, and that the
159 # test runner is linked.
160 ":ios_web_unittests_bundle_data",
161 ":run_all_unittests",
162
163 # Add individual test source_set targets here.
marqfd110bc2017-06-13 14:23:25164 ":ios_web_general_unittests",
165 ":ios_web_navigation_unittests",
166 ":ios_web_net_unittests",
167 ":ios_web_public_unittests",
marqfd110bc2017-06-13 14:23:25168 ":ios_web_web_state_js_unittests",
169 ":ios_web_web_state_ui_unittests",
170 ":ios_web_web_state_unittests",
171 ":ios_web_webui_unittests",
Eugene But306c7782017-08-18 21:25:02172 "//ios/testing:http_server_bundle_data",
Eugene But3dd6bfe2017-11-20 21:01:47173 "//ios/web/download:download_unittests",
Mike Dougherty53d43862017-11-30 04:20:51174 "//ios/web/interstitials:interstitials_unittests",
marqfd110bc2017-06-13 14:23:25175 ]
176
177 assert_no_deps = ios_assert_no_deps
Sylvain Defresne2d66e422017-06-16 12:43:06178 configs += [ "//build/config/compiler:enable_arc" ]
marqfd110bc2017-06-13 14:23:25179}
180
181source_set("ios_web_general_unittests") {
marq96aaa6fa2017-06-14 09:14:53182 configs += [ "//build/config/compiler:enable_arc" ]
marqfd110bc2017-06-13 14:23:25183 testonly = true
184 deps = [
185 ":core",
agrieved7a71c882015-11-20 19:53:28186 ":web",
sdefresneaa7c1cf2015-10-22 00:41:11187 "//base",
188 "//base/test:test_support",
olivierrobin44fccdc32017-01-18 09:52:44189 "//components/url_formatter",
sdefresne5f39d8e62016-05-18 19:27:37190 "//ios/net",
sdefresnec1f1f872015-11-13 14:37:51191 "//ios/testing:ocmock_support",
Eugene Butb5fc5d302017-10-17 03:07:40192 "//ios/web/public",
baxley66cc96f02017-05-31 18:13:32193 "//ios/web/public/test",
194 "//ios/web/public/test/fakes",
sdefresne5f39d8e62016-05-18 19:27:37195 "//ios/web/test:mojo_bindings",
baxley66cc96f02017-05-31 18:13:32196 "//ios/web/test:test_constants",
197 "//ios/web/test:test_support",
sdefresneaa7c1cf2015-10-22 00:41:11198 "//net:test_support",
rockot734fb662016-10-15 16:41:30199 "//services/service_manager/public/cpp",
sdefresneaa7c1cf2015-10-22 00:41:11200 "//testing/gmock",
201 "//testing/gtest",
202 "//third_party/ocmock",
203 "//ui/base:test_support",
sdefresneaa7c1cf2015-10-22 00:41:11204 ]
205
206 sources = [
sdefresneaa7c1cf2015-10-22 00:41:11207 "browser_state_unittest.cc",
sdefresneaa7c1cf2015-10-22 00:41:11208 "history_state_util_unittest.mm",
Maks Orlovichc71746a62018-04-27 21:52:17209 "network_context_owner_unittest.cc",
Colin Blundell285e5bb2017-07-04 09:10:32210 "service_manager_connection_impl_unittest.cc",
marqfd110bc2017-06-13 14:23:25211 "test/web_test_unittest.mm",
212 "url_scheme_util_unittest.mm",
213 "url_util_unittest.cc",
Eugene Butaebe39ad2018-04-23 18:06:35214 "web_client_unittest.mm",
marqfd110bc2017-06-13 14:23:25215 ]
216}
217
218source_set("ios_web_navigation_unittests") {
marqa2e2ad02017-06-14 13:35:12219 configs += [ "//build/config/compiler:enable_arc" ]
marqfd110bc2017-06-13 14:23:25220 testonly = true
221 deps = [
222 ":core",
marqfd110bc2017-06-13 14:23:25223 ":web",
224 "//base",
225 "//base/test:test_support",
marqfd110bc2017-06-13 14:23:25226 "//components/url_formatter",
227 "//ios/net",
marqfd110bc2017-06-13 14:23:25228 "//ios/testing:ocmock_support",
Eugene But85cab06b2017-10-30 21:58:12229 "//ios/web/navigation",
230 "//ios/web/navigation:core",
Eugene Butb5fc5d302017-10-17 03:07:40231 "//ios/web/public",
marqfd110bc2017-06-13 14:23:25232 "//ios/web/public/test",
233 "//ios/web/public/test/fakes",
234 "//ios/web/test:mojo_bindings",
235 "//ios/web/test:test_constants",
236 "//ios/web/test:test_support",
kkhorimotod3cb2e602017-06-21 22:40:23237 "//ios/web/test/fakes",
Eugene But85cab06b2017-10-30 21:58:12238 "//ios/web/web_state/ui:crw_web_view_navigation_proxy",
marqfd110bc2017-06-13 14:23:25239 "//net:test_support",
240 "//services/service_manager/public/cpp",
241 "//testing/gmock",
242 "//testing/gtest",
243 "//third_party/ocmock",
244 "//ui/base:test_support",
245 ]
246
247 sources = [
Danyao Wangc58221c022017-08-01 22:15:56248 "navigation/crw_navigation_item_holder_unittest.mm",
kkhorimoto78f08f6f2017-02-03 20:43:12249 "navigation/crw_navigation_item_storage_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11250 "navigation/crw_session_controller_unittest.mm",
kkhorimoto211c75c2017-02-14 01:58:56251 "navigation/crw_session_storage_unittest.mm",
Danyao Wang65448f22018-06-11 19:24:13252 "navigation/error_retry_state_machine_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11253 "navigation/navigation_item_impl_unittest.mm",
kkhorimoto211c75c2017-02-14 01:58:56254 "navigation/navigation_item_storage_test_util.h",
255 "navigation/navigation_item_storage_test_util.mm",
sdefresneaa7c1cf2015-10-22 00:41:11256 "navigation/navigation_manager_impl_unittest.mm",
Sylvain Defresne2d66e422017-06-16 12:43:06257 "navigation/navigation_manager_util_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11258 "navigation/nscoder_util_unittest.mm",
Danyao Wangc58221c022017-08-01 22:15:56259 "navigation/wk_based_navigation_manager_impl_unittest.mm",
Danyao Wang55240652018-03-29 22:41:25260 "navigation/wk_navigation_util_unittest.mm",
marqfd110bc2017-06-13 14:23:25261 ]
262}
263
264source_set("ios_web_net_unittests") {
marq2d62599d2017-06-14 15:16:43265 configs += [ "//build/config/compiler:enable_arc" ]
marqfd110bc2017-06-13 14:23:25266 testonly = true
267 deps = [
268 ":core",
marqfd110bc2017-06-13 14:23:25269 ":web",
270 "//base",
271 "//base/test:test_support",
marqfd110bc2017-06-13 14:23:25272 "//components/url_formatter",
273 "//ios/net",
Mohammad Refaatb22b8492017-11-07 01:59:57274 "//ios/net:test_support",
marqfd110bc2017-06-13 14:23:25275 "//ios/testing:ocmock_support",
Eugene But85cab06b2017-10-30 21:58:12276 "//ios/web/navigation",
Eugene Butcd0b2972017-11-01 19:49:41277 "//ios/web/net/cookies",
Eugene Butb5fc5d302017-10-17 03:07:40278 "//ios/web/public",
marqfd110bc2017-06-13 14:23:25279 "//ios/web/public/test",
280 "//ios/web/public/test/fakes",
281 "//ios/web/test:mojo_bindings",
282 "//ios/web/test:test_constants",
283 "//ios/web/test:test_support",
Danyao Wangdd9891542017-07-24 17:20:34284 "//ios/web/test/fakes",
Eugene But85cab06b2017-10-30 21:58:12285 "//ios/web/web_state:wk_web_view_security_util",
marqfd110bc2017-06-13 14:23:25286 "//net:test_support",
287 "//services/service_manager/public/cpp",
288 "//testing/gmock",
289 "//testing/gtest",
290 "//third_party/ocmock",
291 "//ui/base:test_support",
292 ]
293
294 sources = [
sdefresnec1f1f872015-11-13 14:37:51295 "net/cert_host_pair_unittest.cc",
sdefresneaa7c1cf2015-10-22 00:41:11296 "net/cert_policy_unittest.cc",
mrefaata6501d92017-12-11 19:50:50297 "net/cookies/system_cookie_store_util_unittest.mm",
Eugene Butcd0b2972017-11-01 19:49:41298 "net/cookies/wk_cookie_util_unittest.mm",
Mohammad Refaatb22b8492017-11-07 01:59:57299 "net/cookies/wk_http_system_cookie_store_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11300 "net/crw_cert_verification_controller_unittest.mm",
eugenebutbe48a5a82016-03-31 15:17:07301 "net/crw_ssl_status_updater_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11302 "net/request_group_util_unittest.mm",
303 "net/request_tracker_impl_unittest.mm",
304 "net/web_http_protocol_handler_delegate_unittest.mm",
marqfd110bc2017-06-13 14:23:25305 ]
306}
307
Sylvain Defresne2d66e422017-06-16 12:43:06308source_set("test_support") {
309 configs += [ "//build/config/compiler:enable_arc" ]
310 testonly = true
311 sources = [
312 "public/test/crw_mock_web_state_delegate.h",
313 "public/test/crw_mock_web_state_delegate.mm",
314 ]
315 deps = [
316 "//ios/testing:ocmock_support",
317 "//ios/web",
318 ]
319}
320
marqfd110bc2017-06-13 14:23:25321source_set("ios_web_public_unittests") {
marq06957aa82017-06-14 05:31:08322 configs += [ "//build/config/compiler:enable_arc" ]
marqfd110bc2017-06-13 14:23:25323 testonly = true
324 deps = [
325 ":core",
Sylvain Defresne2d66e422017-06-16 12:43:06326 ":test_support",
marqfd110bc2017-06-13 14:23:25327 ":web",
328 "//base",
329 "//base/test:test_support",
marqfd110bc2017-06-13 14:23:25330 "//components/url_formatter",
331 "//ios/net",
Mohammad Refaatb22b8492017-11-07 01:59:57332 "//ios/net:ios_net_unittests",
marqfd110bc2017-06-13 14:23:25333 "//ios/testing:ocmock_support",
Eugene Butb5fc5d302017-10-17 03:07:40334 "//ios/web/public",
marqfd110bc2017-06-13 14:23:25335 "//ios/web/public/test",
336 "//ios/web/public/test/fakes",
337 "//ios/web/test:mojo_bindings",
338 "//ios/web/test:test_constants",
339 "//ios/web/test:test_support",
Eugene But85cab06b2017-10-30 21:58:12340 "//ios/web/web_state:page_viewport_state",
marqfd110bc2017-06-13 14:23:25341 "//net:test_support",
342 "//services/service_manager/public/cpp",
343 "//testing/gmock",
344 "//testing/gtest",
345 "//third_party/ocmock",
346 "//ui/base:test_support",
347 ]
348
349 sources = [
Sylvain Defresne2d66e422017-06-16 12:43:06350 "public/crw_session_certificate_policy_cache_storage_unittest.mm",
eugenebut79fb44b2016-04-29 00:34:46351 "public/origin_util_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11352 "public/referrer_util_unittest.cc",
kkhorimoto52378462017-02-11 04:53:12353 "public/serializable_user_data_manager_unittest.mm",
Eric Lawrencee5cdce162017-11-09 02:57:25354 "public/ssl_status_unittest.cc",
kkhorimotod79e11f2017-03-02 23:20:08355 "public/user_agent_unittest.mm",
kkhorimotob9dd98ce2016-03-03 00:24:26356 "public/web_state/page_viewport_state_unittest.mm",
marqfd110bc2017-06-13 14:23:25357 ]
358}
359
360source_set("ios_web_web_state_unittests") {
marq19c5a8a2017-06-14 15:48:56361 configs += [ "//build/config/compiler:enable_arc" ]
marqfd110bc2017-06-13 14:23:25362 testonly = true
363 deps = [
364 ":core",
Sylvain Defresne2d66e422017-06-16 12:43:06365 ":test_support",
marqfd110bc2017-06-13 14:23:25366 ":web",
367 "//base",
368 "//base/test:test_support",
marqfd110bc2017-06-13 14:23:25369 "//components/url_formatter",
370 "//ios/net",
marqfd110bc2017-06-13 14:23:25371 "//ios/testing:ocmock_support",
Sylvain Defresneac70b2c2017-08-25 08:37:43372 "//ios/web",
Eugene Butb3a4a4bc2018-06-27 16:49:49373 "//ios/web/interstitials",
Danyao Wanga765fd82018-01-10 19:52:20374 "//ios/web/navigation",
Eugene Butb5fc5d302017-10-17 03:07:40375 "//ios/web/public",
marqfd110bc2017-06-13 14:23:25376 "//ios/web/public/test",
377 "//ios/web/public/test/fakes",
378 "//ios/web/test:mojo_bindings",
379 "//ios/web/test:test_constants",
380 "//ios/web/test:test_support",
Eugene Butb3a4a4bc2018-06-27 16:49:49381 "//ios/web/test/fakes",
Eugene But5964f7a2018-06-05 15:09:54382 "//ios/web/web_state",
Eugene But85cab06b2017-10-30 21:58:12383 "//ios/web/web_state:context_menu",
Eugene But5964f7a2018-06-05 15:09:54384 "//ios/web/web_state:error_translation_util",
385 "//ios/web/web_state:navigation_context",
Eugene But85cab06b2017-10-30 21:58:12386 "//ios/web/web_state:session_certificate_policy_cache",
Mike Dougherty1ccdd172018-06-29 17:43:40387 "//ios/web/web_state:web_frame",
Eugene But85cab06b2017-10-30 21:58:12388 "//ios/web/web_state:web_view_internal_creation_util",
389 "//ios/web/web_state:wk_web_view_security_util",
marqfd110bc2017-06-13 14:23:25390 "//net:test_support",
391 "//services/service_manager/public/cpp",
392 "//testing/gmock",
393 "//testing/gtest",
394 "//third_party/ocmock",
395 "//ui/base:test_support",
edchin2c89a252017-06-24 07:18:03396 "//ui/gfx:test_support",
marqfd110bc2017-06-13 14:23:25397 ]
398
399 sources = [
olivierrobin44fccdc32017-01-18 09:52:44400 "web_state/context_menu_params_utils_unittest.mm",
eugenebut52c43f42016-06-30 23:57:55401 "web_state/error_translation_util_unittest.mm",
marqfd110bc2017-06-13 14:23:25402 "web_state/navigation_context_impl_unittest.mm",
403 "web_state/page_display_state_unittest.mm",
Sylvain Defresneac70b2c2017-08-25 08:37:43404 "web_state/session_certificate_policy_cache_impl_unittest.mm",
405 "web_state/session_certificate_policy_cache_storage_builder_unittest.mm",
Mike Dougherty1ccdd172018-06-29 17:43:40406 "web_state/web_frame_impl_unittest.mm",
Mike Dougherty03f93202018-07-10 06:57:53407 "web_state/web_frames_manager_impl_unittest.mm",
marqfd110bc2017-06-13 14:23:25408 "web_state/web_state_delegate_bridge_unittest.mm",
409 "web_state/web_state_impl_unittest.mm",
410 "web_state/web_state_observer_bridge_unittest.mm",
mrefaat2b73f102018-08-02 02:44:09411 "web_state/web_state_policy_decider_bridge_unittest.mm",
marqfd110bc2017-06-13 14:23:25412 "web_state/web_state_unittest.mm",
413 "web_state/web_view_internal_creation_util_unittest.mm",
414 "web_state/wk_web_view_security_util_unittest.mm",
415 ]
416}
417
418source_set("ios_web_web_state_js_unittests") {
marqfda67592017-06-14 18:36:43419 configs += [ "//build/config/compiler:enable_arc" ]
marqfd110bc2017-06-13 14:23:25420 testonly = true
421 deps = [
422 ":core",
marqfd110bc2017-06-13 14:23:25423 ":web",
424 "//base",
425 "//base/test:test_support",
marqfd110bc2017-06-13 14:23:25426 "//components/url_formatter",
427 "//ios/net",
marqfd110bc2017-06-13 14:23:25428 "//ios/testing:ocmock_support",
Eugene Butb5fc5d302017-10-17 03:07:40429 "//ios/web/public",
marqfd110bc2017-06-13 14:23:25430 "//ios/web/public/test",
431 "//ios/web/public/test/fakes",
432 "//ios/web/test:mojo_bindings",
433 "//ios/web/test:test_constants",
434 "//ios/web/test:test_support",
Eugene But85cab06b2017-10-30 21:58:12435 "//ios/web/web_state:context_menu",
Eugene But5964f7a2018-06-05 15:09:54436 "//ios/web/web_state:navigation_context",
Eugene But85cab06b2017-10-30 21:58:12437 "//ios/web/web_state/js",
438 "//ios/web/web_state/ui:crw_wk_script_message_router",
marqfd110bc2017-06-13 14:23:25439 "//net:test_support",
440 "//services/service_manager/public/cpp",
441 "//testing/gmock",
442 "//testing/gtest",
443 "//third_party/ocmock",
444 "//ui/base:test_support",
445 ]
446
447 sources = [
sdefresneaa7c1cf2015-10-22 00:41:11448 "web_state/js/common_js_unittest.mm",
danyao85159982017-04-11 15:20:22449 "web_state/js/context_menu_js_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11450 "web_state/js/crw_js_injection_manager_unittest.mm",
stkhapugin8d13d52f2015-12-04 18:46:01451 "web_state/js/crw_js_post_request_loader_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11452 "web_state/js/crw_js_window_id_manager_unittest.mm",
Mike Dougherty99ef6d952018-06-22 19:43:25453 "web_state/js/frame_messaging_js_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11454 "web_state/js/page_script_util_unittest.mm",
marqfd110bc2017-06-13 14:23:25455 ]
456}
457
458source_set("ios_web_web_state_ui_unittests") {
marqe9031192017-06-14 19:11:07459 configs += [ "//build/config/compiler:enable_arc" ]
marqfd110bc2017-06-13 14:23:25460 testonly = true
461 deps = [
462 ":core",
marqfd110bc2017-06-13 14:23:25463 ":web",
464 "//base",
465 "//base/test:test_support",
marqfd110bc2017-06-13 14:23:25466 "//components/url_formatter",
467 "//ios/net",
marqfd110bc2017-06-13 14:23:25468 "//ios/testing:ocmock_support",
Eugene But85cab06b2017-10-30 21:58:12469 "//ios/web/navigation",
470 "//ios/web/navigation:core",
Eugene Butb5fc5d302017-10-17 03:07:40471 "//ios/web/public",
marqfd110bc2017-06-13 14:23:25472 "//ios/web/public/test",
473 "//ios/web/public/test/fakes",
474 "//ios/web/test:mojo_bindings",
475 "//ios/web/test:test_constants",
476 "//ios/web/test:test_support",
Danyao Wangf4cba3d2017-10-30 15:24:12477 "//ios/web/test/fakes:fakes",
Mike Dougherty3c4d85f2018-02-21 19:00:59478 "//ios/web/web_state:context_menu",
Eugene But5964f7a2018-06-05 15:09:54479 "//ios/web/web_state:navigation_context",
Eugene But85cab06b2017-10-30 21:58:12480 "//ios/web/web_state:wk_web_view_security_util",
481 "//ios/web/web_state/js",
Mike Dougherty3c4d85f2018-02-21 19:00:59482 "//ios/web/web_state/ui:crw_context_menu_controller",
Eugene But85cab06b2017-10-30 21:58:12483 "//ios/web/web_state/ui:crw_wk_script_message_router",
Gauthier Ambard44bbfa52018-02-23 16:36:28484 "//ios/web/web_state/ui:favicon_util",
Eugene But85cab06b2017-10-30 21:58:12485 "//ios/web/web_state/ui:web_view_js_utils",
marqfd110bc2017-06-13 14:23:25486 "//net:test_support",
487 "//services/service_manager/public/cpp",
488 "//testing/gmock",
489 "//testing/gtest",
490 "//third_party/ocmock",
491 "//ui/base:test_support",
492 ]
493
494 sources = [
sdefresneaa7c1cf2015-10-22 00:41:11495 "web_state/ui/crw_web_controller_unittest.mm",
Gauthier Ambard01cf90812018-02-28 09:21:58496 "web_state/ui/crw_web_view_content_view_unittest.mm",
497 "web_state/ui/crw_web_view_proxy_impl_unittest.mm",
eugenebut46487992017-03-16 17:21:29498 "web_state/ui/crw_web_view_scroll_view_proxy_unittest.mm",
eugenebut5f167532017-01-04 01:35:38499 "web_state/ui/crw_wk_navigation_states_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11500 "web_state/ui/crw_wk_script_message_router_unittest.mm",
Gauthier Ambard44bbfa52018-02-23 16:36:28501 "web_state/ui/favicon_util_unittest.mm",
Mike Dougherty3c4d85f2018-02-21 19:00:59502 "web_state/ui/html_element_fetch_request_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11503 "web_state/ui/web_view_js_utils_unittest.mm",
504 "web_state/ui/wk_back_forward_list_item_holder_unittest.mm",
mrefaat222269c2018-02-16 02:40:21505 "web_state/ui/wk_navigation_action_util_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11506 "web_state/ui/wk_web_view_configuration_provider_unittest.mm",
marqfd110bc2017-06-13 14:23:25507 ]
508}
509
510source_set("ios_web_webui_unittests") {
marq8317b2b2017-06-14 15:45:02511 configs += [ "//build/config/compiler:enable_arc" ]
marqfd110bc2017-06-13 14:23:25512 testonly = true
513 deps = [
514 ":core",
marqfd110bc2017-06-13 14:23:25515 ":web",
516 "//base",
517 "//base/test:test_support",
marqfd110bc2017-06-13 14:23:25518 "//components/url_formatter",
519 "//ios/net",
marqfd110bc2017-06-13 14:23:25520 "//ios/testing:ocmock_support",
Eugene Butb5fc5d302017-10-17 03:07:40521 "//ios/web/public",
marqfd110bc2017-06-13 14:23:25522 "//ios/web/public/test",
523 "//ios/web/public/test/fakes",
524 "//ios/web/test:mojo_bindings",
525 "//ios/web/test:test_constants",
526 "//ios/web/test:test_support",
527 "//net:test_support",
528 "//services/service_manager/public/cpp",
529 "//testing/gmock",
530 "//testing/gtest",
531 "//third_party/ocmock",
532 "//ui/base:test_support",
533 ]
534
535 sources = [
sdefresneaa7c1cf2015-10-22 00:41:11536 "webui/crw_web_ui_manager_unittest.mm",
537 "webui/crw_web_ui_page_builder_unittest.mm",
eugenebut91b474352016-05-18 01:58:56538 "webui/mojo_facade_unittest.mm",
sdefresneaa7c1cf2015-10-22 00:41:11539 "webui/url_fetcher_block_adapter_unittest.mm",
540 ]
541}
542
sdefresne44b76fd2016-03-31 02:37:37543test("ios_web_inttests") {
marq687e15bb2017-06-15 15:53:02544 configs += [ "//build/config/compiler:enable_arc" ]
sdefresne44b76fd2016-03-31 02:37:37545 deps = [
sdefresne44b76fd2016-03-31 02:37:37546 ":web",
547 "//base/test:test_support",
Eugene But94612d792018-05-08 19:17:00548 "//ios/testing:embedded_test_server_support",
kkhorimotoce346ca2017-01-18 01:27:29549 "//ios/testing:http_server_bundle_data",
yzshen7e5e9552017-06-26 21:56:26550 "//ios/web:resources_grit",
Eugene Butedbfbe92017-11-22 03:11:52551 "//ios/web/download:download_inttests",
Eugene But85cab06b2017-10-30 21:58:12552 "//ios/web/navigation:core",
baxley66cc96f02017-05-31 18:13:32553 "//ios/web/public/test",
554 "//ios/web/public/test/fakes",
555 "//ios/web/public/test/http_server",
eugenebutb81a4b22016-06-01 21:08:16556 "//ios/web/test:mojo_bindings",
557 "//ios/web/test:packed_resources",
558 "//ios/web/test:resources",
baxley66cc96f02017-05-31 18:13:32559 "//ios/web/test:test_constants",
560 "//ios/web/test:test_support",
Eugene But5964f7a2018-06-05 15:09:54561 "//ios/web/web_state",
Mike Doughertye6fd5b6b2018-07-18 09:07:50562 "//ios/web/web_state:web_frame",
Ken Rockot9b26bc52018-07-04 19:57:49563 "//mojo/core/embedder",
sdefresne44b76fd2016-03-31 02:37:37564 "//net:test_support",
John Abd-El-Malek07a93f12018-02-08 19:28:25565 "//services/network/public/cpp",
rockot734fb662016-10-15 16:41:30566 "//services/service_manager/public/cpp",
sdefresne44b76fd2016-03-31 02:37:37567 "//testing/gtest",
568 "//ui/base:test_support",
569 ]
570 sources = [
571 "browser_state_web_view_partition_inttest.mm",
kkhorimoto2a90b3aa2017-01-24 05:31:15572 "navigation/history_state_operations_inttest.mm",
kkhorimotoce346ca2017-01-18 01:27:29573 "navigation/window_location_inttest.mm",
sdefresne44b76fd2016-03-31 02:37:37574 "public/test/http_server_inttest.mm",
575 "test/run_all_unittests.cc",
John Abd-El-Malek07a93f12018-02-08 19:28:25576 "url_loader_inttest.mm",
Eugene But94612d792018-05-08 19:17:00577 "web_state/error_page_inttest.mm",
eugenebut302e8332017-05-13 01:22:05578 "web_state/favicon_callbacks_inttest.mm",
eugenebut9bac5912017-01-21 03:25:40579 "web_state/http_auth_inttest.mm",
Mike Doughertye6fd5b6b2018-07-18 09:07:50580 "web_state/web_frames_manager_inttest.mm",
Eugene But1570e062018-08-02 15:26:40581 "web_state/web_state_observer_inttest.mm",
eugenebutb81a4b22016-06-01 21:08:16582 "webui/web_ui_mojo_inttest.mm",
sdefresne44b76fd2016-03-31 02:37:37583 ]
sdefresne61384ea2016-06-23 09:26:17584
585 assert_no_deps = ios_assert_no_deps
sdefresne44b76fd2016-03-31 02:37:37586}
587
eugenebutf11a95c2016-04-15 17:40:47588js_compile_bundle("web_ui_bundle") {
589 visibility = [ ":js_resources" ]
590 closure_entry_point = "__crWeb.webUIBundle"
591
592 sources = [
yzshen7e5e9552017-06-26 21:56:26593 "webui/resources/mojo_api.js",
eugenebutf11a95c2016-04-15 17:40:47594 "webui/resources/web_ui_base.js",
595 "webui/resources/web_ui_bind.js",
596 "webui/resources/web_ui_bundle.js",
eugenebutf11a95c2016-04-15 17:40:47597 "webui/resources/web_ui_send.js",
598 ]
599}
600
Vadym Doroshenko29756f9c2017-12-07 01:52:29601js_compile_bundle("main_frame_web_bundle") {
sdefresneaa7c1cf2015-10-22 00:41:11602 visibility = [ ":js_resources" ]
Vadym Doroshenko29756f9c2017-12-07 01:52:29603 closure_entry_point = "__crWeb.mainFrameWebBundle"
sdefresneaa7c1cf2015-10-22 00:41:11604
605 sources = [
sdefresneaa7c1cf2015-10-22 00:41:11606 "web_state/js/resources/console.js",
danyao0adc0cc2017-04-13 20:29:00607 "web_state/js/resources/error.js",
danyaoc1ff1362017-04-13 19:05:36608 "web_state/js/resources/legacy.js",
Mike Dougherty989be1322018-03-23 22:00:00609 "web_state/js/resources/main_frame_context_menu.js",
Vadym Doroshenko29756f9c2017-12-07 01:52:29610 "web_state/js/resources/main_frame_web_bundle.js",
Danyao Wang23a351a2017-11-10 19:49:59611 "web_state/js/resources/navigation.js",
danyao1e1d3832017-04-11 18:25:31612 "web_state/js/resources/scroll_workaround.js",
Vadym Doroshenko29756f9c2017-12-07 01:52:29613 ]
614}
615
616js_compile_bundle("all_frames_web_bundle") {
617 visibility = [ ":js_resources" ]
618 closure_entry_point = "__crWeb.allFramesWebBundle"
619
620 sources = [
Mike Dougherty989be1322018-03-23 22:00:00621 "web_state/js/resources/all_frames_context_menu.js",
Vadym Doroshenko29756f9c2017-12-07 01:52:29622 "web_state/js/resources/all_frames_web_bundle.js",
623 "web_state/js/resources/base.js",
Vadym Doroshenkod03fc5b2017-12-13 22:08:56624 "web_state/js/resources/common.js",
Mike Dougherty99ef6d952018-06-22 19:43:25625 "web_state/js/resources/frame_messaging.js",
Vadym Doroshenkod03fc5b2017-12-13 22:08:56626 "web_state/js/resources/message.js",
sdefresneaa7c1cf2015-10-22 00:41:11627 ]
628}
629
Mike Doughertye6fd5b6b2018-07-18 09:07:50630js_compile_bundle("all_frames_document_end_web_bundle") {
631 visibility = [ ":js_resources" ]
632 closure_entry_point = "__crWeb.allFramesDocumentEndWebBundle"
633
634 sources = [
635 "web_state/js/resources/all_frames_document_end_web_bundle.js",
636 "web_state/js/resources/plugin_placeholder.js",
637 "web_state/js/resources/setup_frame.js",
638 ]
639}
640
danyaoa6be7082017-06-26 21:31:36641js_compile_bundle("nav_bundle") {
642 visibility = [ ":js_resources" ]
Danyao Wang23a351a2017-11-10 19:49:59643 closure_entry_point = "__crWeb.legacynavigation"
danyaoa6be7082017-06-26 21:31:36644
645 sources = [
Danyao Wang23a351a2017-11-10 19:49:59646 "web_state/js/resources/legacy_navigation.js",
danyaoa6be7082017-06-26 21:31:36647 ]
648}
649
sdefresneaa7c1cf2015-10-22 00:41:11650js_compile_checked("js_resources") {
sdefresne1e411932016-03-25 17:02:22651 public_deps = [
Mike Doughertye6fd5b6b2018-07-18 09:07:50652 ":all_frames_document_end_web_bundle",
Vadym Doroshenko29756f9c2017-12-07 01:52:29653 ":all_frames_web_bundle",
654 ":main_frame_web_bundle",
danyaoa6be7082017-06-26 21:31:36655 ":nav_bundle",
eugenebutf11a95c2016-04-15 17:40:47656 ":web_ui_bundle",
sdefresneaa7c1cf2015-10-22 00:41:11657 ]
658
659 sources = [
sdefresned2bbd872016-04-13 17:46:01660 "web_state/js/resources/post_request.js",
sdefresneaa7c1cf2015-10-22 00:41:11661 "web_state/js/resources/window_id.js",
sdefresneaa7c1cf2015-10-22 00:41:11662 ]
663}
eugenebut395c54ea2016-05-19 23:16:57664
Danyao Wang0c4719892017-10-05 20:51:35665bundle_data("navigation_resources") {
666 sources = [
667 "navigation/resources/restore_session.html",
668 ]
669 outputs = [
670 "{{bundle_resources_dir}}/{{source_file_part}}",
671 ]
672}
673
eugenebut395c54ea2016-05-19 23:16:57674grit("resources") {
675 source = "ios_web_resources.grd"
Dirk Prankea3727f92017-07-17 17:30:33676
677 # The .grd contains references to generated files.
678 source_is_generated = true
679
eugenebut395c54ea2016-05-19 23:16:57680 outputs = [
681 "grit/ios_web_resources.h",
682 "ios_web_resources.pak",
683 ]
wangjimmy43ca78b2017-02-14 22:08:26684 grit_flags = [
685 "-E",
686 "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
687 ]
688 deps = [
Colin Blundell285e5bb2017-07-04 09:10:32689 "//ios/web/public/app:browser_manifest",
690 "//ios/web/public/app:packaged_services_manifest",
Yuzhu Shen4ccd2692017-12-11 19:14:25691 "//mojo/public/js:bindings",
wangjimmy43ca78b2017-02-14 22:08:26692 ]
eugenebut395c54ea2016-05-19 23:16:57693}