blob: 827ca6f47f71084fdaeefc68873bae7d23bbab35 [file] [log] [blame]
[email protected]4625ade2014-04-15 19:26:441# Copyright (c) 2013 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
mefff34b822016-01-11 15:28:085import("//build/buildflag_header.gni")
slan77bdc2e62015-09-21 17:56:266import("//build/config/chromecast_build.gni")
brettw4cab0f12015-09-14 21:40:017import("//build/config/compiler/compiler.gni")
[email protected]4625ade2014-04-15 19:26:448import("//build/config/crypto.gni")
9import("//build/config/features.gni")
10import("//build/config/ui.gni")
dpranked4da5ab42015-10-13 06:20:3311import("//build_overrides/v8.gni")
eromane6264fd2016-03-02 22:46:3012import("//testing/libfuzzer/fuzzer_test.gni")
qsrfb5251d12015-01-21 15:57:2213import("//testing/test.gni")
rockot9c67e5f2015-03-12 20:01:2114import("//third_party/icu/config.gni")
rtennetib6f1c0d2015-04-03 17:52:0615import("//third_party/protobuf/proto_library.gni")
tfarinae597851a2015-10-06 23:14:4116import("//tools/grit/grit_rule.gni")
kapishnikovabe280e2016-04-14 19:07:1617import("//url/features.gni")
[email protected]26046b52014-07-16 00:11:0318
[email protected]4625ade2014-04-15 19:26:4419if (is_android) {
20 import("//build/config/android/config.gni")
[email protected]ef0eb442014-05-15 09:32:1821 import("//build/config/android/rules.gni")
[email protected]4625ade2014-04-15 19:26:4422} else if (is_mac) {
23 import("//build/config/mac/mac_sdk.gni")
24}
25
26# The list of net files is kept in net.gypi. Read it.
scottmg34fb7e52014-12-03 23:27:2427gypi_values = exec_script("//build/gypi_to_gn.py",
28 [ rebase_path("net.gypi") ],
29 "scope",
30 [ "net.gypi" ])
[email protected]4625ade2014-04-15 19:26:4431
[email protected]4625ade2014-04-15 19:26:4432# The way the cache uses mmap() is inefficient on some Android devices. If
33# this flag is set, we hackily avoid using mmap() in the disk cache. We are
34# pretty confident that mmap-ing the index would not hurt any existing x86
35# android devices, but we cannot be so sure about the variety of ARM devices.
36# So enable it for x86 only for now.
dpranke43276212015-02-20 02:55:1937posix_avoid_mmap = is_android && current_cpu != "x86"
[email protected]4625ade2014-04-15 19:26:4438
[email protected]8a3f8242014-06-05 18:05:1239use_v8_in_net = !is_ios
[email protected]4625ade2014-04-15 19:26:4440enable_built_in_dns = !is_ios
41
[email protected]384dab92014-06-04 20:26:0842declare_args() {
43 # Disables support for file URLs. File URL support requires use of icu.
44 disable_file_support = false
mefff34b822016-01-11 15:28:0845
agrieve56240df2015-12-22 22:20:2146 # WebSockets and socket stream code are not used on iOS and are optional in
47 # cronet.
48 enable_websockets = !is_ios
49 disable_ftp_support = is_ios
skyostil2df951b2016-04-01 11:33:4350
51 # Enable Kerberos authentication. It is disabled by default on ChromeOS, iOS,
52 # Chromecast, at least for now. This feature needs configuration (krb5.conf
53 # and so on).
54 use_kerberos = !is_chromeos && !is_ios && !is_chromecast
kapishnikovabe280e2016-04-14 19:07:1655
56 # Do not disable brotli filter by default.
57 disable_brotli_filter = false
[email protected]384dab92014-06-04 20:26:0858}
[email protected]02494ec2014-05-07 15:05:2959
[email protected]4625ade2014-04-15 19:26:4460config("net_config") {
61 defines = []
62 if (posix_avoid_mmap) {
63 defines += [ "POSIX_AVOID_MMAP" ]
64 }
[email protected]02494ec2014-05-07 15:05:2965 if (disable_file_support) {
66 defines += [ "DISABLE_FILE_SUPPORT" ]
67 }
tfarinae7c8c3c2015-11-04 15:09:5568 if (disable_ftp_support) {
69 defines += [ "DISABLE_FTP_SUPPORT=1" ]
70 }
[email protected]4625ade2014-04-15 19:26:4471}
72
xunjieli905496a2015-08-31 15:51:1773config("net_internal_config") {
[email protected]8603c5de2014-04-16 20:34:3174 defines = [
[email protected]8603c5de2014-04-16 20:34:3175 "DLOPEN_KERBEROS",
scottmg34fb7e52014-12-03 23:27:2476 "NET_IMPLEMENTATION",
[email protected]8603c5de2014-04-16 20:34:3177 ]
dpranke43276212015-02-20 02:55:1978
[email protected]4625ade2014-04-15 19:26:4479 if (use_kerberos) {
80 defines += [ "USE_KERBEROS" ]
81 if (is_android) {
xunjieli905496a2015-08-31 15:51:1782 include_dirs = [ "/usr/include/kerberosV" ]
[email protected]4625ade2014-04-15 19:26:4483 }
[email protected]4625ade2014-04-15 19:26:4484 }
85
86 if (enable_built_in_dns) {
87 defines += [ "ENABLE_BUILT_IN_DNS" ]
xunjieli905496a2015-08-31 15:51:1788 }
89}
90
kapishnikovabe280e2016-04-14 19:07:1691net_configs = [
xunjieli905496a2015-08-31 15:51:1792 ":net_internal_config",
93 "//build/config:precompiled_headers",
94
95 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
96 "//build/config/compiler:no_size_t_to_int_warning",
97]
98
kapishnikovabe280e2016-04-14 19:07:1699if (use_glib && use_gconf && !is_chromeos) {
agrieve95ba4442016-04-25 15:47:13100 net_configs += [ "//build/config/linux/gconf" ]
kapishnikovabe280e2016-04-14 19:07:16101}
xunjieli905496a2015-08-31 15:51:17102
kapishnikovabe280e2016-04-14 19:07:16103if (is_linux) {
104 net_configs += [ "//build/config/linux:libresolv" ]
xunjieli905496a2015-08-31 15:51:17105}
106
107component("net") {
kapishnikovabe280e2016-04-14 19:07:16108 sources = gypi_values.net_nacl_common_sources
109 net_unfiltered_sources = []
110
111 deps = [
112 ":net_resources",
113 "//base",
114 "//net/base/registry_controlled_domains",
115 "//third_party/protobuf:protobuf_lite",
116 "//url:url_features",
117 ]
118
119 public_deps = [
120 ":net_quic_proto",
121 "//crypto",
122 "//crypto:platform",
123 ]
124
125 if (!is_nacl) {
126 sources += gypi_values.net_non_nacl_sources
127
128 deps += [
129 "//base/third_party/dynamic_annotations",
130 "//components/prefs",
131 "//sdch",
132 "//third_party/zlib",
133 ]
134
135 if (!use_kerberos) {
136 sources -= [
137 "http/http_auth_handler_negotiate.cc",
138 "http/http_auth_handler_negotiate.h",
139 ]
140 }
141
142 if (is_posix) {
143 if (posix_avoid_mmap) {
144 sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
145 } else {
146 sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
147 }
148 }
149
150 if (!enable_built_in_dns) {
151 sources -= [
152 "dns/address_sorter_posix.cc",
153 "dns/address_sorter_posix.h",
154 "dns/dns_client.cc",
155 ]
156 }
157
kapishnikovabe280e2016-04-14 19:07:16158 if (!use_openssl_certs) {
159 sources -= [
160 "base/crypto_module_openssl.cc",
161 "base/keygen_handler_openssl.cc",
162 "base/openssl_private_key_store.h",
163 "base/openssl_private_key_store_memory.cc",
164 "cert/cert_database_openssl.cc",
165 "cert/cert_verify_proc_openssl.cc",
166 "cert/cert_verify_proc_openssl.h",
167 "cert/test_root_certs_openssl.cc",
168 "cert/x509_certificate_openssl.cc",
169 "ssl/openssl_client_key_store.cc",
170 "ssl/openssl_client_key_store.h",
171 ]
172 if (is_android) {
173 sources -= [ "base/openssl_private_key_store_android.cc" ]
174 }
175 } else {
176 if (is_android) {
177 # Android doesn't use these even when using OpenSSL.
178 sources -= [
179 "base/openssl_private_key_store_memory.cc",
180 "cert/cert_database_openssl.cc",
181 "cert/cert_verify_proc_openssl.cc",
182 "cert/test_root_certs_openssl.cc",
183 ]
184 }
185 }
186
187 if (!use_kerberos || is_android) {
188 sources -= [
189 "http/http_auth_gssapi_posix.cc",
190 "http/http_auth_gssapi_posix.h",
191 ]
192 }
193
194 if (use_glib && use_gconf && !is_chromeos) {
dsinclair8490e052016-05-04 15:33:33195 deps += [ "//build/linux/libgio" ]
kapishnikovabe280e2016-04-14 19:07:16196 }
197
198 if (!use_nss_certs) {
199 sources -= [
200 "base/crypto_module_nss.cc",
201 "base/keygen_handler_nss.cc",
202 "cert/cert_database_nss.cc",
203 "cert/nss_cert_database.cc",
204 "cert/nss_cert_database.h",
205 "cert/x509_certificate_nss.cc",
206 "ssl/client_cert_store_nss.cc",
207 "ssl/client_cert_store_nss.h",
208 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
209 "third_party/mozilla_security_manager/nsKeygenHandler.h",
210 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
211 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
212 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
213 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
214 ]
215 if (is_chromeos) {
216 # These were already removed on non-ChromeOS.
217 sources -= [
218 "cert/nss_cert_database_chromeos.cc",
219 "cert/nss_cert_database_chromeos.h",
220 "cert/nss_profile_filter_chromeos.cc",
221 "cert/nss_profile_filter_chromeos.h",
222 ]
223 }
224 sources -= [
225 "ssl/client_key_store.cc",
226 "ssl/client_key_store.h",
227 "ssl/ssl_platform_key_nss.cc",
228 ]
svaldez2135be52016-04-20 16:34:53229 } else {
kapishnikovabe280e2016-04-14 19:07:16230 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
231 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that
232 # file in directly.
233 sources += [ "third_party/nss/ssl/cmpcert.c" ]
234 }
235
svaldez2135be52016-04-20 16:34:53236 if (!use_nss_certs) {
kapishnikovabe280e2016-04-14 19:07:16237 # These files are part of the partial implementation of NSS for
238 # cert verification, so keep them in that case.
239 sources -= [
240 "cert/cert_verify_proc_nss.cc",
241 "cert/cert_verify_proc_nss.h",
242 "cert/test_root_certs_nss.cc",
svaldez2135be52016-04-20 16:34:53243 "cert/x509_util_nss.cc",
kapishnikovabe280e2016-04-14 19:07:16244 "cert_net/nss_ocsp.cc",
245 "cert_net/nss_ocsp.h",
246 ]
247 }
248
kapishnikovabe280e2016-04-14 19:07:16249 if (is_chromecast && use_nss_certs) {
250 sources += [ "ssl/ssl_platform_key_chromecast.cc" ]
251 sources -= [ "ssl/ssl_platform_key_nss.cc" ]
252 }
253
254 if (!enable_mdns) {
255 sources -= [
256 "dns/mdns_cache.cc",
257 "dns/mdns_cache.h",
258 "dns/mdns_client.cc",
259 "dns/mdns_client.h",
260 "dns/mdns_client_impl.cc",
261 "dns/mdns_client_impl.h",
262 "dns/record_parsed.cc",
263 "dns/record_parsed.h",
264 "dns/record_rdata.cc",
265 "dns/record_rdata.h",
266 ]
267 }
268
269 if (is_win) {
270 sources -= [ "http/http_auth_handler_ntlm_portable.cc" ]
271 } else { # !is_win
272 sources -= [
273 "base/winsock_init.cc",
274 "base/winsock_init.h",
275 "base/winsock_util.cc",
276 "base/winsock_util.h",
277 "proxy/proxy_resolver_winhttp.cc",
278 "proxy/proxy_resolver_winhttp.h",
279 ]
280 }
281
282 if (is_ios) {
283 # Add back some sources that were otherwise filtered out.
284 # iOS needs some Mac files.
285 net_unfiltered_sources += [
286 "base/mac/url_conversions.h",
287 "base/mac/url_conversions.mm",
288 "base/network_change_notifier_mac.cc",
289 "base/network_config_watcher_mac.cc",
290 "base/network_interfaces_mac.cc",
291 "base/network_interfaces_mac.h",
292 "base/platform_mime_util_mac.mm",
svaldez2135be52016-04-20 16:34:53293 "cert/test_root_certs_mac.cc",
kapishnikovabe280e2016-04-14 19:07:16294 "proxy/proxy_resolver_mac.cc",
295 "proxy/proxy_server_mac.cc",
296 ]
297
298 sources -= [ "disk_cache/blockfile/file_posix.cc" ]
299 }
300
kapishnikovabe280e2016-04-14 19:07:16301 if (is_ios || is_mac) {
302 sources += gypi_values.net_base_mac_ios_sources
303 }
304
305 if (is_android) {
306 deps += [ ":net_jni_headers" ]
307
308 # Add some Linux sources that were excluded by the filter, but which
309 # are needed.
310 net_unfiltered_sources += [
311 "base/address_tracker_linux.cc",
312 "base/address_tracker_linux.h",
313 "base/network_interfaces_linux.cc",
314 "base/network_interfaces_linux.h",
315 "base/platform_mime_util_linux.cc",
316 ]
317 }
318 } else {
319 public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
320 }
xunjieli905496a2015-08-31 15:51:17321
322 # Add back some sources that were otherwise filtered out.
323 set_sources_assignment_filter([])
kapishnikovabe280e2016-04-14 19:07:16324 sources += net_unfiltered_sources
xunjieli905496a2015-08-31 15:51:17325 set_sources_assignment_filter(sources_assignment_filter)
326
327 cflags = []
kapishnikovabe280e2016-04-14 19:07:16328 configs += net_configs
xunjieli905496a2015-08-31 15:51:17329 public_configs = [ ":net_config" ]
330
kapishnikovabe280e2016-04-14 19:07:16331 public_deps += [ "//url" ]
[email protected]4625ade2014-04-15 19:26:44332
333 if (is_mac) {
[email protected]4625ade2014-04-15 19:26:44334 libs = [
rsesek02aa51c2016-05-11 02:13:57335 "CFNetwork.framework",
336 "CoreServices.framework",
[email protected]ab9ce6e2014-04-17 20:33:19337 "Foundation.framework",
338 "Security.framework",
339 "SystemConfiguration.framework",
340 "resolv",
[email protected]4625ade2014-04-15 19:26:44341 ]
342 }
343
344 if (is_ios) {
[email protected]4625ade2014-04-15 19:26:44345 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19346 "CFNetwork.framework",
347 "MobileCoreServices.framework",
348 "Security.framework",
349 "SystemConfiguration.framework",
350 "resolv",
[email protected]4625ade2014-04-15 19:26:44351 ]
xunjieli06d93982015-08-27 17:13:02352 }
xunjieli4c8c6922015-08-27 16:02:40353
jam5332a632016-04-01 22:36:05354 if (is_win) {
355 libs = [
356 "crypt32.lib",
357 "dhcpcsvc.lib",
358 "iphlpapi.lib",
359 "rpcrt4.lib",
360 "secur32.lib",
361 "urlmon.lib",
362 "winhttp.lib",
363 ]
364 }
365
sergeyu99d83f92015-09-14 23:03:33366 if (!is_nacl) {
367 if (!disable_file_support) {
368 sources += gypi_values.net_file_support_sources
369 }
xunjieli06d93982015-08-27 17:13:02370
sergeyu99d83f92015-09-14 23:03:33371 if (!disable_ftp_support) {
372 sources += gypi_values.net_ftp_support_sources
373 }
xunjieli905496a2015-08-31 15:51:17374
sergeyu99d83f92015-09-14 23:03:33375 if (enable_websockets) {
376 sources += gypi_values.net_websockets_sources
377 }
xunjieli905496a2015-08-31 15:51:17378
sergeyu99d83f92015-09-14 23:03:33379 # ICU support.
kapishnikovabe280e2016-04-14 19:07:16380 if (use_platform_icu_alternatives) {
381 if (is_android) {
382 # Use ICU alternative on Android.
383 sources += [
384 "base/net_string_util_icu_alternatives_android.cc",
385 "base/net_string_util_icu_alternatives_android.h",
386 ]
387 deps += [ ":net_jni_headers" ]
388 } else if (is_ios) {
389 # Use ICU alternative on iOS.
390 sources += [ "base/net_string_util_icu_alternatives_ios.mm" ]
391 } else {
392 assert(false,
393 "ICU alternative is not implemented for platform: " + target_os)
394 }
395 } else {
396 # Use ICU.
397 deps += [
398 "//base:i18n",
399 "//third_party/icu",
400 ]
401 sources += [
402 "base/filename_util_icu.cc",
403 "base/net_string_util_icu.cc",
404 ]
405 }
eustasfbec9132015-12-30 14:56:51406
407 # Brotli support.
kapishnikovabe280e2016-04-14 19:07:16408 if (!disable_brotli_filter) {
409 sources += [ "filter/brotli_filter.cc" ]
410 deps += [ "//third_party/brotli" ]
411 } else {
412 sources += [ "filter/brotli_filter_disabled.cc" ]
413 }
[email protected]85191ed2014-05-15 00:41:49414 }
[email protected]4625ade2014-04-15 19:26:44415}
416
417grit("net_resources") {
418 source = "base/net_resources.grd"
[email protected]7ae52902014-08-18 22:36:01419 use_qualified_include = true
[email protected]b89c53842014-07-23 16:32:32420 outputs = [
421 "grit/net_resources.h",
422 "net_resources.pak",
[email protected]b89c53842014-07-23 16:32:32423 ]
[email protected]4625ade2014-04-15 19:26:44424}
425
rtennetib6f1c0d2015-04-03 17:52:06426proto_library("net_quic_proto") {
kapishnikovabe280e2016-04-14 19:07:16427 visibility = [ ":net" ]
brettw2e7db0a2015-04-24 22:59:17428
rtennetib6f1c0d2015-04-03 17:52:06429 sources = [
430 "quic/proto/cached_network_parameters.proto",
431 "quic/proto/source_address_token.proto",
432 ]
433 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
434 cc_include = "net/base/net_export.h"
435
436 defines = [ "NET_IMPLEMENTATION" ]
437
438 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
439}
440
Brett Wilson83fd4242014-09-02 19:45:33441static_library("extras") {
mef327a8e42014-08-29 17:10:03442 sources = gypi_values.net_extras_sources
443 configs += [ "//build/config/compiler:wexit_time_destructors" ]
444 deps = [
445 ":net",
brettwbc44c0a92015-02-20 22:30:39446 "//base",
mef327a8e42014-08-29 17:10:03447 "//sql:sql",
448 ]
449}
450
[email protected]8a3f8242014-06-05 18:05:12451static_library("http_server") {
[email protected]4625ade2014-04-15 19:26:44452 sources = [
453 "server/http_connection.cc",
454 "server/http_connection.h",
455 "server/http_server.cc",
456 "server/http_server.h",
457 "server/http_server_request_info.cc",
458 "server/http_server_request_info.h",
459 "server/http_server_response_info.cc",
460 "server/http_server_response_info.h",
461 "server/web_socket.cc",
462 "server/web_socket.h",
dgozmana6e70092014-12-12 14:46:21463 "server/web_socket_encoder.cc",
464 "server/web_socket_encoder.h",
[email protected]4625ade2014-04-15 19:26:44465 ]
jambc6cc8e2014-11-14 17:56:29466 configs += [
brettwd1c719a2015-02-19 23:17:04467 "//build/config/compiler:no_size_t_to_int_warning",
jambc6cc8e2014-11-14 17:56:29468 "//build/config/compiler:wexit_time_destructors",
jambc6cc8e2014-11-14 17:56:29469 ]
[email protected]4625ade2014-04-15 19:26:44470 deps = [
471 ":net",
472 "//base",
473 ]
474}
475
sdefresne3001f172016-03-16 10:30:03476if (!is_ios) {
477 executable("dump_cache") {
478 testonly = true
479 sources = [
480 "tools/dump_cache/dump_cache.cc",
481 "tools/dump_cache/dump_files.cc",
482 "tools/dump_cache/dump_files.h",
483 ]
[email protected]4625ade2014-04-15 19:26:44484
sdefresne3001f172016-03-16 10:30:03485 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
486 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31487
sdefresne3001f172016-03-16 10:30:03488 deps = [
489 ":net",
490 ":test_support",
491 "//base",
492 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07493 "//build/win:default_exe_manifest",
sdefresne3001f172016-03-16 10:30:03494 ]
495 }
[email protected]8603c5de2014-04-16 20:34:31496}
497
sdefresneb0a31642016-03-18 11:04:45498bundle_data("test_support_bundle_data") {
sdefresne04f91142016-04-21 08:41:59499 visibility = [ ":test_support" ]
sdefresneb0a31642016-03-18 11:04:45500 testonly = true
sdefresne04f91142016-04-21 08:41:59501 sources = gypi_values.net_test_support_data_sources
sdefresneb0a31642016-03-18 11:04:45502 outputs = [
503 "{{bundle_resources_dir}}/" +
504 "{{source_root_relative_dir}}/{{source_file_part}}",
505 ]
506}
507
[email protected]b2b2bf52014-05-28 20:26:57508source_set("test_support") {
Brett Wilson8f80ad0b2014-09-08 19:50:24509 testonly = true
[email protected]8603c5de2014-04-16 20:34:31510 sources = [
[email protected]8603c5de2014-04-16 20:34:31511 "base/load_timing_info_test_util.cc",
512 "base/load_timing_info_test_util.h",
513 "base/mock_file_stream.cc",
514 "base/mock_file_stream.h",
515 "base/test_completion_callback.cc",
516 "base/test_completion_callback.h",
517 "base/test_data_directory.cc",
518 "base/test_data_directory.h",
519 "cert/mock_cert_verifier.cc",
520 "cert/mock_cert_verifier.h",
ryanchung987b2ff2016-02-19 00:17:12521 "cert/mock_client_cert_verifier.cc",
522 "cert/mock_client_cert_verifier.h",
[email protected]8603c5de2014-04-16 20:34:31523 "cookies/cookie_monster_store_test.cc",
524 "cookies/cookie_monster_store_test.h",
525 "cookies/cookie_store_test_callbacks.cc",
526 "cookies/cookie_store_test_callbacks.h",
527 "cookies/cookie_store_test_helpers.cc",
528 "cookies/cookie_store_test_helpers.h",
drogerfd8b2772015-12-04 14:34:56529 "cookies/cookie_store_unittest.h",
[email protected]8603c5de2014-04-16 20:34:31530 "disk_cache/disk_cache_test_base.cc",
531 "disk_cache/disk_cache_test_base.h",
532 "disk_cache/disk_cache_test_util.cc",
533 "disk_cache/disk_cache_test_util.h",
534 "dns/dns_test_util.cc",
535 "dns/dns_test_util.h",
536 "dns/mock_host_resolver.cc",
537 "dns/mock_host_resolver.h",
538 "dns/mock_mdns_socket_factory.cc",
539 "dns/mock_mdns_socket_factory.h",
[email protected]8a3f8242014-06-05 18:05:12540 "http/http_transaction_test_util.cc",
541 "http/http_transaction_test_util.h",
vishal.b62985ca92015-04-17 08:45:51542 "log/test_net_log.cc",
543 "log/test_net_log.h",
mmenke43758e62015-05-04 21:09:46544 "log/test_net_log_entry.cc",
545 "log/test_net_log_entry.h",
mmenke0034c542015-05-05 22:34:59546 "log/test_net_log_util.cc",
mmenke43758e62015-05-04 21:09:46547 "log/test_net_log_util.h",
[email protected]8603c5de2014-04-16 20:34:31548 "proxy/mock_proxy_resolver.cc",
549 "proxy/mock_proxy_resolver.h",
550 "proxy/mock_proxy_script_fetcher.cc",
551 "proxy/mock_proxy_script_fetcher.h",
552 "proxy/proxy_config_service_common_unittest.cc",
553 "proxy/proxy_config_service_common_unittest.h",
554 "socket/socket_test_util.cc",
555 "socket/socket_test_util.h",
556 "test/cert_test_util.cc",
557 "test/cert_test_util.h",
[email protected]83e1ae32014-07-18 10:57:07558 "test/cert_test_util_nss.cc",
nharper2e171cf2015-06-01 20:29:23559 "test/channel_id_test_util.cc",
560 "test/channel_id_test_util.h",
[email protected]8603c5de2014-04-16 20:34:31561 "test/ct_test_util.cc",
562 "test/ct_test_util.h",
svaldez7d25c562015-10-30 19:09:45563 "test/embedded_test_server/default_handlers.cc",
564 "test/embedded_test_server/default_handlers.h",
[email protected]8603c5de2014-04-16 20:34:31565 "test/embedded_test_server/embedded_test_server.cc",
566 "test/embedded_test_server/embedded_test_server.h",
567 "test/embedded_test_server/http_connection.cc",
568 "test/embedded_test_server/http_connection.h",
569 "test/embedded_test_server/http_request.cc",
570 "test/embedded_test_server/http_request.h",
571 "test/embedded_test_server/http_response.cc",
572 "test/embedded_test_server/http_response.h",
svaldez6e7e82a22015-10-28 19:39:53573 "test/embedded_test_server/request_handler_util.cc",
574 "test/embedded_test_server/request_handler_util.h",
sammc6ac3fe52015-02-25 06:00:28575 "test/event_waiter.h",
johnme36ae5802016-05-10 15:46:24576 "test/gtest_util.h",
[email protected]8603c5de2014-04-16 20:34:31577 "test/net_test_suite.cc",
578 "test/net_test_suite.h",
579 "test/python_utils.cc",
580 "test/python_utils.h",
johnme36ae5802016-05-10 15:46:24581 "test/scoped_disable_exit_on_dfatal.cc",
582 "test/scoped_disable_exit_on_dfatal.h",
brettw6315e032015-11-27 18:38:36583 "test/test_certificate_data.h",
sherouk51b4b098b2015-08-10 09:00:43584 "test/url_request/ssl_certificate_error_job.cc",
585 "test/url_request/ssl_certificate_error_job.h",
Brett Wilson32ce17a2014-11-10 17:45:30586 "test/url_request/url_request_failed_job.cc",
587 "test/url_request/url_request_failed_job.h",
xunjieli5d1f9892016-05-18 20:44:34588 "test/url_request/url_request_hanging_read_job.cc",
589 "test/url_request/url_request_hanging_read_job.h",
mef3e826cf2014-12-13 18:40:40590 "test/url_request/url_request_mock_data_job.cc",
591 "test/url_request/url_request_mock_data_job.h",
jam8e45cd72015-01-20 16:33:44592 "test/url_request/url_request_slow_download_job.cc",
593 "test/url_request/url_request_slow_download_job.h",
[email protected]8603c5de2014-04-16 20:34:31594 "url_request/test_url_fetcher_factory.cc",
595 "url_request/test_url_fetcher_factory.h",
596 "url_request/url_request_test_util.cc",
597 "url_request/url_request_test_util.h",
598 ]
sherouk3eee4a82015-09-01 10:42:33599 if (!is_ios) {
600 sources += [
601 "test/spawned_test_server/base_test_server.cc",
602 "test/spawned_test_server/base_test_server.h",
603 "test/spawned_test_server/local_test_server.cc",
604 "test/spawned_test_server/local_test_server.h",
605 "test/spawned_test_server/local_test_server_posix.cc",
606 "test/spawned_test_server/local_test_server_win.cc",
607 "test/spawned_test_server/spawned_test_server.h",
608 ]
609 }
[email protected]8603c5de2014-04-16 20:34:31610
brettwbc8b2a22015-07-28 18:24:42611 configs += [
612 "//build/config:precompiled_headers",
613
614 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
615 "//build/config/compiler:no_size_t_to_int_warning",
616 ]
[email protected]8603c5de2014-04-16 20:34:31617
Brett Wilsone53895272014-09-23 23:41:46618 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31619 "//base",
620 "//base/test:test_support",
[email protected]22fe91d2014-08-12 17:07:12621 "//crypto",
[email protected]59ff2d42014-04-22 22:25:23622 "//net",
[email protected]8603c5de2014-04-16 20:34:31623 "//net/tools/tld_cleanup",
624 "//testing/gmock",
625 "//testing/gtest",
626 "//url",
627 ]
628
sdefresne04f91142016-04-21 08:41:59629 deps = [
630 ":test_support_bundle_data",
631 ]
632
jamb533b7e2015-03-04 17:12:05633 if (!is_ios) {
634 public_deps += [ "//third_party/protobuf:py_proto" ]
635 }
636
svaldez2135be52016-04-20 16:34:53637 if (use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24638 public_deps += [ "//crypto:platform" ]
[email protected]8603c5de2014-04-16 20:34:31639 }
640
sherouk3eee4a82015-09-01 10:42:33641 if (is_android) {
642 sources += [
[email protected]8603c5de2014-04-16 20:34:31643 "test/spawned_test_server/remote_test_server.cc",
644 "test/spawned_test_server/remote_test_server.h",
645 "test/spawned_test_server/spawner_communicator.cc",
646 "test/spawned_test_server/spawner_communicator.h",
647 ]
648 }
649
650 if (use_v8_in_net) {
Brett Wilsone53895272014-09-23 23:41:46651 public_deps += [ ":net_with_v8" ]
[email protected]8603c5de2014-04-16 20:34:31652 }
653
654 if (!enable_mdns) {
655 sources -= [
656 "dns/mock_mdns_socket_factory.cc",
657 "dns/mock_mdns_socket_factory.h",
658 ]
659 }
660
davidben15d69d482014-09-29 18:24:08661 if (!use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24662 sources -= [ "test/cert_test_util_nss.cc" ]
[email protected]83e1ae32014-07-18 10:57:07663 }
xunjielia6888202015-04-14 21:34:25664
665 if (!disable_file_support) {
666 sources += [
667 "test/url_request/url_request_mock_http_job.cc",
668 "test/url_request/url_request_mock_http_job.h",
669 "url_request/test_url_request_interceptor.cc",
670 "url_request/test_url_request_interceptor.h",
671 ]
672 }
[email protected]8603c5de2014-04-16 20:34:31673}
674
[email protected]ceeaac792014-06-25 05:14:43675source_set("balsa") {
676 sources = [
677 "tools/balsa/balsa_enums.h",
678 "tools/balsa/balsa_frame.cc",
679 "tools/balsa/balsa_frame.h",
680 "tools/balsa/balsa_headers.cc",
681 "tools/balsa/balsa_headers.h",
682 "tools/balsa/balsa_headers_token_utils.cc",
683 "tools/balsa/balsa_headers_token_utils.h",
684 "tools/balsa/balsa_visitor_interface.h",
685 "tools/balsa/http_message_constants.cc",
686 "tools/balsa/http_message_constants.h",
687 "tools/balsa/noop_balsa_visitor.h",
688 "tools/balsa/simple_buffer.cc",
689 "tools/balsa/simple_buffer.h",
[email protected]ceeaac792014-06-25 05:14:43690 "tools/balsa/string_piece_utils.h",
rtennetie0ee6eb2015-05-01 00:55:09691 "tools/quic/spdy_balsa_utils.cc",
692 "tools/quic/spdy_balsa_utils.h",
[email protected]ceeaac792014-06-25 05:14:43693 ]
694 deps = [
695 ":net",
696 "//base",
[email protected]22fe91d2014-08-12 17:07:12697 "//url",
[email protected]ceeaac792014-06-25 05:14:43698 ]
699}
700
[email protected]8603c5de2014-04-16 20:34:31701if (use_v8_in_net) {
702 component("net_with_v8") {
703 sources = [
704 "proxy/proxy_resolver_v8.cc",
705 "proxy/proxy_resolver_v8.h",
706 "proxy/proxy_resolver_v8_tracing.cc",
707 "proxy/proxy_resolver_v8_tracing.h",
sammcf2d1ea02015-06-29 02:58:47708 "proxy/proxy_resolver_v8_tracing_wrapper.cc",
709 "proxy/proxy_resolver_v8_tracing_wrapper.h",
[email protected]8603c5de2014-04-16 20:34:31710 "proxy/proxy_service_v8.cc",
711 "proxy/proxy_service_v8.h",
712 ]
713
714 defines = [ "NET_IMPLEMENTATION" ]
dprankea22b0732015-10-21 21:15:11715
[email protected]8603c5de2014-04-16 20:34:31716 configs += [
brettwd1c719a2015-02-19 23:17:04717 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31718 "//build/config/compiler:wexit_time_destructors",
dprankea22b0732015-10-21 21:15:11719 "//v8:external_startup_data",
[email protected]8603c5de2014-04-16 20:34:31720 ]
721
Brett Wilsone53895272014-09-23 23:41:46722 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31723 ":net",
Brett Wilsone53895272014-09-23 23:41:46724 ]
725 deps = [
[email protected]8603c5de2014-04-16 20:34:31726 "//base",
727 "//gin",
728 "//url",
729 "//v8",
730 ]
731 }
732}
733
amistry7e6ebfdc82015-02-13 04:19:11734if (use_v8_in_net && !is_android) {
735 source_set("net_browser_services") {
736 sources = [
737 "dns/mojo_host_resolver_impl.cc",
738 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01739 "proxy/in_process_mojo_proxy_resolver_factory.cc",
740 "proxy/in_process_mojo_proxy_resolver_factory.h",
sammc1d5df4d2015-05-05 05:06:17741 "proxy/mojo_proxy_resolver_factory.h",
eromandcacef22015-06-01 19:36:35742 "proxy/proxy_resolver_factory_mojo.cc",
743 "proxy/proxy_resolver_factory_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01744 "proxy/proxy_service_mojo.cc",
745 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11746 ]
747
748 public_deps = [
749 ":mojo_type_converters",
tfarina8ac4d17f2015-12-16 02:11:11750 ":net_with_v8",
brettwbc44c0a92015-02-20 22:30:39751 "//base",
amistry07ff1402015-03-10 07:34:07752 "//mojo/common",
rockot85dce0862015-11-13 01:33:59753 "//mojo/public/cpp/bindings",
amistry7e6ebfdc82015-02-13 04:19:11754 "//net/interfaces",
amistry6e1ed1b2015-03-12 05:24:01755
756 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
757 # this dependency since in_process_mojo_proxy_resolver_factory creates
758 # the utility process side Mojo services in the browser process.
759 # Ultimately, this will go away when we only support out-of-process.
760 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11761 ]
762 }
763
764 source_set("mojo_type_converters") {
765 sources = [
amistry7ec58112015-02-26 06:03:00766 "dns/mojo_host_type_converters.cc",
767 "dns/mojo_host_type_converters.h",
768 "proxy/mojo_proxy_type_converters.cc",
769 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11770 ]
771
772 public_deps = [
773 ":net",
tfarina8ac4d17f2015-12-16 02:11:11774 "//base",
rockot85dce0862015-11-13 01:33:59775 "//mojo/public/cpp/bindings",
amistry7e6ebfdc82015-02-13 04:19:11776 "//net/interfaces",
amistry7e6ebfdc82015-02-13 04:19:11777 ]
778 }
sammc5403aa1d2015-02-25 04:59:21779
780 source_set("net_utility_services") {
781 sources = [
sammc6ac3fe52015-02-25 06:00:28782 "dns/host_resolver_mojo.cc",
783 "dns/host_resolver_mojo.h",
sammc352f7492015-02-25 09:45:24784 "proxy/mojo_proxy_resolver_factory_impl.cc",
785 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21786 "proxy/mojo_proxy_resolver_impl.cc",
787 "proxy/mojo_proxy_resolver_impl.h",
sammca3242c92015-07-10 02:38:51788 "proxy/mojo_proxy_resolver_v8_tracing_bindings.h",
sammc5403aa1d2015-02-25 04:59:21789 ]
790
rockot9509ec82015-04-14 02:50:56791 deps = [
792 ":net_with_v8",
tfarina8ac4d17f2015-12-16 02:11:11793 "//base",
rockot9509ec82015-04-14 02:50:56794 ]
795
sammc5403aa1d2015-02-25 04:59:21796 public_deps = [
797 ":mojo_type_converters",
798 ":net",
799 "//mojo/common",
rockot85dce0862015-11-13 01:33:59800 "//mojo/public/cpp/bindings",
sammc5403aa1d2015-02-25 04:59:21801 "//net/interfaces",
sammc5403aa1d2015-02-25 04:59:21802 ]
803 }
amistry7e6ebfdc82015-02-13 04:19:11804}
805
[email protected]8603c5de2014-04-16 20:34:31806if (!is_ios && !is_android) {
807 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24808 testonly = true
scottmg34fb7e52014-12-03 23:27:24809 sources = [
810 "tools/crash_cache/crash_cache.cc",
811 ]
dpranke43276212015-02-20 02:55:19812
brettwd1c719a2015-02-19 23:17:04813 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
814 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31815 deps = [
816 ":net",
[email protected]b2b2bf52014-05-28 20:26:57817 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31818 "//base",
brettwba7a73d2015-08-31 22:17:39819 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07820 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31821 ]
822 }
823
824 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24825 testonly = true
scottmg34fb7e52014-12-03 23:27:24826 sources = [
827 "tools/crl_set_dump/crl_set_dump.cc",
828 ]
dpranke43276212015-02-20 02:55:19829
brettwd1c719a2015-02-19 23:17:04830 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
831 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31832 deps = [
833 ":net",
834 "//base",
brettwba7a73d2015-08-31 22:17:39835 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07836 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31837 ]
838 }
839
840 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24841 testonly = true
scottmg34fb7e52014-12-03 23:27:24842 sources = [
843 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
844 ]
dpranke43276212015-02-20 02:55:19845
brettwd1c719a2015-02-19 23:17:04846 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
847 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31848 deps = [
849 ":net",
850 "//base",
brettwba7a73d2015-08-31 22:17:39851 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07852 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31853 ]
854 }
855
856 executable("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24857 testonly = true
[email protected]8603c5de2014-04-16 20:34:31858 sources = [
859 "tools/gdig/file_net_log.cc",
860 "tools/gdig/gdig.cc",
861 ]
862 deps = [
863 ":net",
864 "//base",
brettwba7a73d2015-08-31 22:17:39865 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07866 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31867 ]
868 }
869
870 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24871 testonly = true
scottmg34fb7e52014-12-03 23:27:24872 sources = [
873 "tools/get_server_time/get_server_time.cc",
874 ]
dpranke43276212015-02-20 02:55:19875
brettwd1c719a2015-02-19 23:17:04876 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
877 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31878 deps = [
879 ":net",
880 "//base",
881 "//base:i18n",
brettwba7a73d2015-08-31 22:17:39882 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07883 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31884 "//url",
885 ]
886 }
887
rockot9c67e5f2015-03-12 20:01:21888 executable("hpack_example_generator") {
889 testonly = true
890 sources = [
891 "spdy/fuzzing/hpack_example_generator.cc",
892 ]
893
894 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
895 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
896 deps = [
rockot9c67e5f2015-03-12 20:01:21897 ":net",
brettwba7a73d2015-08-31 22:17:39898 "//base",
899 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07900 "//build/win:default_exe_manifest",
rockot9c67e5f2015-03-12 20:01:21901 ]
902 }
903
904 executable("hpack_fuzz_mutator") {
905 testonly = true
906 sources = [
907 "spdy/fuzzing/hpack_fuzz_mutator.cc",
908 ]
909
910 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
911 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
912 deps = [
rockot9c67e5f2015-03-12 20:01:21913 ":net",
brettwba7a73d2015-08-31 22:17:39914 "//base",
915 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07916 "//build/win:default_exe_manifest",
rockot9c67e5f2015-03-12 20:01:21917 ]
918 }
919
920 executable("hpack_fuzz_wrapper") {
921 testonly = true
922 sources = [
923 "spdy/fuzzing/hpack_fuzz_wrapper.cc",
924 ]
925
926 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
927 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
928 deps = [
rockot9c67e5f2015-03-12 20:01:21929 ":net",
brettwba7a73d2015-08-31 22:17:39930 "//base",
931 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07932 "//build/win:default_exe_manifest",
rockot9c67e5f2015-03-12 20:01:21933 ]
934 }
935
[email protected]8603c5de2014-04-16 20:34:31936 if (use_v8_in_net) {
937 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24938 testonly = true
scottmg34fb7e52014-12-03 23:27:24939 sources = [
940 "tools/net_watcher/net_watcher.cc",
941 ]
[email protected]8603c5de2014-04-16 20:34:31942 deps = [
943 ":net",
944 ":net_with_v8",
945 "//base",
brettwba7a73d2015-08-31 22:17:39946 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07947 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31948 ]
949
mostynbbf5e6cc2015-10-21 07:53:31950 if (is_desktop_linux && use_gconf && use_glib) {
xunjieli905496a2015-08-31 15:51:17951 configs += [
agrieve95ba4442016-04-25 15:47:13952 "//build/config/linux/gconf",
xunjieli905496a2015-08-31 15:51:17953 "//build/config/linux:glib",
954 ]
dsinclair8490e052016-05-04 15:33:33955 deps += [ "//build/linux/libgio" ]
[email protected]8603c5de2014-04-16 20:34:31956 }
957 }
958 }
959
960 executable("run_testserver") {
Brett Wilson8f80ad0b2014-09-08 19:50:24961 testonly = true
scottmg34fb7e52014-12-03 23:27:24962 sources = [
963 "tools/testserver/run_testserver.cc",
964 ]
[email protected]8603c5de2014-04-16 20:34:31965 deps = [
[email protected]b2b2bf52014-05-28 20:26:57966 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31967 "//base",
968 "//base/test:test_support",
brettwba7a73d2015-08-31 22:17:39969 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07970 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31971 "//testing/gtest",
972 ]
973 }
974
975 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24976 testonly = true
scottmg34fb7e52014-12-03 23:27:24977 sources = [
rvargase23fcf652015-03-04 19:59:22978 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:24979 ]
dpranke43276212015-02-20 02:55:19980
brettwd1c719a2015-02-19 23:17:04981 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
982 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31983 deps = [
984 ":net",
[email protected]b2b2bf52014-05-28 20:26:57985 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31986 "//base",
brettwba7a73d2015-08-31 22:17:39987 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07988 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:31989 ]
990 }
991
992 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:24993 sources = [
994 "tools/tld_cleanup/tld_cleanup.cc",
995 ]
dpranke43276212015-02-20 02:55:19996
brettwd1c719a2015-02-19 23:17:04997 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
998 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31999 deps = [
1000 "//base",
1001 "//base:i18n",
brettwba7a73d2015-08-31 22:17:391002 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:071003 "//build/win:default_exe_manifest",
[email protected]8603c5de2014-04-16 20:34:311004 "//net/tools/tld_cleanup",
1005 ]
1006 }
1007}
1008
gabadie0774bee2016-05-12 14:02:581009if (is_linux || is_mac) {
gabadie64af64a2016-03-29 16:36:421010 executable("cachetool") {
1011 testonly = true
1012 sources = [
1013 "tools/cachetool/cachetool.cc",
1014 ]
1015 deps = [
1016 ":net",
1017 ":test_support",
1018 "//base",
1019 ]
1020 }
1021
1022 executable("content_decoder_tool") {
1023 testonly = true
1024 sources = [
1025 "filter/mock_filter_context.cc",
1026 "filter/mock_filter_context.h",
1027 "tools/content_decoder_tool/content_decoder_tool.cc",
1028 ]
1029 deps = [
1030 ":net",
1031 ":test_support",
1032 "//base",
1033 "//url",
1034 ]
1035 }
gabadie0774bee2016-05-12 14:02:581036}
gabadie64af64a2016-03-29 16:36:421037
gabadie0774bee2016-05-12 14:02:581038if (is_linux) {
[email protected]8a3f8242014-06-05 18:05:121039 static_library("epoll_server") {
[email protected]8603c5de2014-04-16 20:34:311040 sources = [
1041 "tools/epoll_server/epoll_server.cc",
1042 "tools/epoll_server/epoll_server.h",
1043 ]
1044 deps = [
1045 ":net",
1046 "//base",
1047 ]
1048 }
1049
[email protected]8a3f8242014-06-05 18:05:121050 static_library("flip_in_mem_edsm_server_base") {
Brett Wilson8f80ad0b2014-09-08 19:50:241051 testonly = true
[email protected]8603c5de2014-04-16 20:34:311052 sources = [
[email protected]8603c5de2014-04-16 20:34:311053 "tools/flip_server/acceptor_thread.cc",
satorux933fc7a2015-02-13 07:09:101054 "tools/flip_server/acceptor_thread.h",
1055 "tools/flip_server/constants.h",
[email protected]8603c5de2014-04-16 20:34:311056 "tools/flip_server/flip_config.cc",
1057 "tools/flip_server/flip_config.h",
1058 "tools/flip_server/http_interface.cc",
1059 "tools/flip_server/http_interface.h",
[email protected]8603c5de2014-04-16 20:34:311060 "tools/flip_server/mem_cache.cc",
satorux933fc7a2015-02-13 07:09:101061 "tools/flip_server/mem_cache.h",
[email protected]8603c5de2014-04-16 20:34:311062 "tools/flip_server/output_ordering.cc",
1063 "tools/flip_server/output_ordering.h",
1064 "tools/flip_server/ring_buffer.cc",
1065 "tools/flip_server/ring_buffer.h",
1066 "tools/flip_server/sm_connection.cc",
1067 "tools/flip_server/sm_connection.h",
1068 "tools/flip_server/sm_interface.h",
[email protected]8603c5de2014-04-16 20:34:311069 "tools/flip_server/spdy_interface.cc",
1070 "tools/flip_server/spdy_interface.h",
satorux933fc7a2015-02-13 07:09:101071 "tools/flip_server/spdy_ssl.cc",
1072 "tools/flip_server/spdy_ssl.h",
[email protected]8603c5de2014-04-16 20:34:311073 "tools/flip_server/spdy_util.cc",
1074 "tools/flip_server/spdy_util.h",
1075 "tools/flip_server/streamer_interface.cc",
1076 "tools/flip_server/streamer_interface.h",
tfarinafb3c78c2016-02-09 22:13:521077 "tools/flip_server/tcp_socket_util.cc",
1078 "tools/flip_server/tcp_socket_util.h",
rvargas145310f2015-08-14 18:09:041079 "tools/flip_server/url_to_filename_encoder.cc",
1080 "tools/flip_server/url_to_filename_encoder.h",
1081 "tools/flip_server/url_utilities.cc",
1082 "tools/flip_server/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:311083 ]
1084 deps = [
1085 ":balsa",
1086 ":epoll_server",
1087 ":net",
1088 "//base",
[email protected]edfd0f42014-07-22 18:20:371089 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311090 ]
1091 }
1092
1093 executable("flip_in_mem_edsm_server_unittests") {
Brett Wilson8f80ad0b2014-09-08 19:50:241094 testonly = true
[email protected]8603c5de2014-04-16 20:34:311095 sources = [
1096 "tools/flip_server/flip_test_utils.cc",
1097 "tools/flip_server/flip_test_utils.h",
1098 "tools/flip_server/http_interface_test.cc",
1099 "tools/flip_server/mem_cache_test.cc",
1100 "tools/flip_server/run_all_tests.cc",
1101 "tools/flip_server/spdy_interface_test.cc",
rvargas145310f2015-08-14 18:09:041102 "tools/flip_server/url_to_filename_encoder_unittest.cc",
1103 "tools/flip_server/url_utilities_unittest.cc",
[email protected]8603c5de2014-04-16 20:34:311104 ]
1105 deps = [
brettwbc44c0a92015-02-20 22:30:391106 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311107 ":flip_in_mem_edsm_server_base",
1108 ":net",
[email protected]b2b2bf52014-05-28 20:26:571109 ":test_support",
brettwba7a73d2015-08-31 22:17:391110 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311111 "//testing/gmock",
agrieved7a71c882015-11-20 19:53:281112 "//testing/gtest",
[email protected]edfd0f42014-07-22 18:20:371113 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311114 ]
1115 }
1116
1117 executable("flip_in_mem_edsm_server") {
Brett Wilson8f80ad0b2014-09-08 19:50:241118 testonly = true
scottmg34fb7e52014-12-03 23:27:241119 sources = [
1120 "tools/flip_server/flip_in_mem_edsm_server.cc",
1121 ]
[email protected]8603c5de2014-04-16 20:34:311122 deps = [
brettwbc44c0a92015-02-20 22:30:391123 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311124 ":flip_in_mem_edsm_server_base",
1125 ":net",
1126 "//base",
brettwba7a73d2015-08-31 22:17:391127 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311128 ]
1129 }
1130
rch216445c2015-03-27 00:23:281131 source_set("epoll_quic_tools") {
[email protected]8603c5de2014-04-16 20:34:311132 sources = [
1133 "tools/quic/quic_client.cc",
1134 "tools/quic/quic_client.h",
[email protected]8603c5de2014-04-16 20:34:311135 "tools/quic/quic_default_packet_writer.cc",
1136 "tools/quic/quic_default_packet_writer.h",
rch16c74d1d2016-04-22 06:14:071137 "tools/quic/quic_epoll_alarm_factory.cc",
1138 "tools/quic/quic_epoll_alarm_factory.h",
[email protected]8603c5de2014-04-16 20:34:311139 "tools/quic/quic_epoll_clock.cc",
1140 "tools/quic/quic_epoll_clock.h",
1141 "tools/quic/quic_epoll_connection_helper.cc",
1142 "tools/quic/quic_epoll_connection_helper.h",
rtennetifb3fa6c2015-03-16 23:04:551143 "tools/quic/quic_packet_reader.cc",
1144 "tools/quic/quic_packet_reader.h",
[email protected]8603c5de2014-04-16 20:34:311145 "tools/quic/quic_packet_writer_wrapper.cc",
1146 "tools/quic/quic_packet_writer_wrapper.h",
1147 "tools/quic/quic_server.cc",
1148 "tools/quic/quic_server.h",
[email protected]8603c5de2014-04-16 20:34:311149 "tools/quic/quic_socket_utils.cc",
1150 "tools/quic/quic_socket_utils.h",
[email protected]8603c5de2014-04-16 20:34:311151 ]
1152 deps = [
1153 ":balsa",
1154 ":epoll_server",
1155 ":net",
tfarina8ac4d17f2015-12-16 02:11:111156 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311157 "//base",
1158 "//base/third_party/dynamic_annotations",
1159 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371160 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311161 "//url",
1162 ]
1163 }
1164
rch216445c2015-03-27 00:23:281165 executable("epoll_quic_client") {
scottmg34fb7e52014-12-03 23:27:241166 sources = [
1167 "tools/quic/quic_client_bin.cc",
1168 ]
[email protected]8603c5de2014-04-16 20:34:311169 deps = [
brettwbc44c0a92015-02-20 22:30:391170 ":balsa",
rch216445c2015-03-27 00:23:281171 ":epoll_quic_tools",
agrieved7a71c882015-11-20 19:53:281172 ":epoll_server",
rch216445c2015-03-27 00:23:281173 ":net",
1174 ":simple_quic_tools",
1175 "//base",
brettwba7a73d2015-08-31 22:17:391176 "//build/config/sanitizers:deps",
rch216445c2015-03-27 00:23:281177 "//third_party/boringssl",
1178 ]
1179 }
1180
1181 executable("epoll_quic_server") {
1182 sources = [
1183 "tools/quic/quic_server_bin.cc",
1184 ]
1185 deps = [
1186 ":balsa",
rch216445c2015-03-27 00:23:281187 ":epoll_quic_tools",
agrieved7a71c882015-11-20 19:53:281188 ":epoll_server",
[email protected]8603c5de2014-04-16 20:34:311189 ":net",
rchda78df5a2015-03-22 05:16:371190 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311191 "//base",
brettwba7a73d2015-08-31 22:17:391192 "//build/config/sanitizers:deps",
[email protected]edfd0f42014-07-22 18:20:371193 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311194 ]
1195 }
[email protected]8603c5de2014-04-16 20:34:311196}
1197
[email protected]ef0eb442014-05-15 09:32:181198if (is_android) {
1199 generate_jni("net_jni_headers") {
1200 sources = [
1201 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1202 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1203 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
tbansal59a1ddc2015-09-14 17:35:011204 "android/java/src/org/chromium/net/AndroidTrafficStats.java",
[email protected]ef0eb442014-05-15 09:32:181205 "android/java/src/org/chromium/net/GURLUtils.java",
aberentec894a52015-07-09 14:45:531206 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
xunjieli905496a2015-08-31 15:51:171207 "android/java/src/org/chromium/net/NetStringUtil.java",
[email protected]ef0eb442014-05-15 09:32:181208 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1209 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1210 "android/java/src/org/chromium/net/X509Util.java",
1211 ]
1212 jni_package = "net"
1213 }
cjhopmandad5f4272014-09-05 01:00:551214 generate_jni("net_test_jni_headers") {
1215 sources = [
1216 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
aberentec894a52015-07-09 14:45:531217 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
jbudorickccffb982015-12-22 01:21:351218 "test/android/javatests/src/org/chromium/net/test/EmbeddedTestServerImpl.java",
cjhopmandad5f4272014-09-05 01:00:551219 ]
brettwcdccaf02015-07-27 16:27:091220 jni_package = "net/test"
cjhopmandad5f4272014-09-05 01:00:551221 }
[email protected]ef0eb442014-05-15 09:32:181222}
[email protected]8603c5de2014-04-16 20:34:311223
1224if (is_android || is_linux) {
1225 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241226 testonly = true
scottmg34fb7e52014-12-03 23:27:241227 sources = [
1228 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1229 ]
[email protected]8603c5de2014-04-16 20:34:311230 deps = [
1231 ":net",
1232 "//base",
brettwba7a73d2015-08-31 22:17:391233 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311234 ]
1235 }
1236}
[email protected]8a3f8242014-06-05 18:05:121237
rch47ad01f2015-03-20 21:17:231238source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491239 sources = [
ckrasica7fd1242016-05-14 20:36:011240 "tools/quic/chlo_extractor.cc",
1241 "tools/quic/chlo_extractor.h",
rtennetid67b3a722015-08-18 05:15:311242 "tools/quic/quic_client_base.cc",
1243 "tools/quic/quic_client_base.h",
rched113b22015-03-26 04:54:051244 "tools/quic/quic_client_session.cc",
1245 "tools/quic/quic_client_session.h",
rchc99f380c2015-03-26 19:50:561246 "tools/quic/quic_dispatcher.cc",
1247 "tools/quic/quic_dispatcher.h",
rch0e945472015-03-26 15:19:211248 "tools/quic/quic_in_memory_cache.cc",
1249 "tools/quic/quic_in_memory_cache.h",
rchc99f380c2015-03-26 19:50:561250 "tools/quic/quic_per_connection_packet_writer.cc",
1251 "tools/quic/quic_per_connection_packet_writer.h",
brettw25ca8922016-03-18 22:59:581252 "tools/quic/quic_process_packet_interface.h",
jokulikc971baf92016-01-06 00:36:391253 "tools/quic/quic_server_session_base.cc",
1254 "tools/quic/quic_server_session_base.h",
rcha9d12ce12015-03-19 23:06:491255 "tools/quic/quic_simple_client.cc",
1256 "tools/quic/quic_simple_client.h",
rch216445c2015-03-27 00:23:281257 "tools/quic/quic_simple_per_connection_packet_writer.cc",
1258 "tools/quic/quic_simple_per_connection_packet_writer.h",
1259 "tools/quic/quic_simple_server.cc",
1260 "tools/quic/quic_simple_server.h",
1261 "tools/quic/quic_simple_server_packet_writer.cc",
1262 "tools/quic/quic_simple_server_packet_writer.h",
jokulikc971baf92016-01-06 00:36:391263 "tools/quic/quic_simple_server_session.cc",
1264 "tools/quic/quic_simple_server_session.h",
danzhb7551342015-12-18 02:06:401265 "tools/quic/quic_simple_server_stream.cc",
1266 "tools/quic/quic_simple_server_stream.h",
rched113b22015-03-26 04:54:051267 "tools/quic/quic_spdy_client_stream.cc",
1268 "tools/quic/quic_spdy_client_stream.h",
rch0e945472015-03-26 15:19:211269 "tools/quic/quic_time_wait_list_manager.cc",
1270 "tools/quic/quic_time_wait_list_manager.h",
rchda78df5a2015-03-22 05:16:371271 "tools/quic/synchronous_host_resolver.cc",
1272 "tools/quic/synchronous_host_resolver.h",
rcha9d12ce12015-03-19 23:06:491273 ]
1274 deps = [
tfarina8ac4d17f2015-12-16 02:11:111275 ":balsa",
rcha9d12ce12015-03-19 23:06:491276 ":net",
1277 "//base",
rch47ad01f2015-03-20 21:17:231278 "//base/third_party/dynamic_annotations",
1279 "//url",
1280 ]
1281}
1282
ricea7afa5232015-12-01 20:55:231283action_foreach("stale_while_revalidate_experiment_domains_dafsa") {
1284 script = "//net/tools/dafsa/make_dafsa.py"
1285 sources = [
1286 "base/stale_while_revalidate_experiment_domains.gperf",
1287 ]
1288 outputs = [
1289 "${target_gen_dir}/base/{{source_name_part}}-inc.cc",
1290 ]
1291 args = [
1292 "{{source}}",
1293 rebase_path("${target_gen_dir}/base/{{source_name_part}}-inc.cc",
1294 root_build_dir),
1295 ]
1296}
1297
1298source_set("stale_while_revalidate_experiment_domains") {
1299 sources = [
1300 "base/stale_while_revalidate_experiment_domains.cc",
1301 "base/stale_while_revalidate_experiment_domains.h",
1302 ]
1303 deps = [
1304 ":net",
1305 ":stale_while_revalidate_experiment_domains_dafsa",
1306 "//base",
1307 ]
kapishnikovabe280e2016-04-14 19:07:161308 configs += net_configs
ricea7afa5232015-12-01 20:55:231309}
1310
sherouk51b4b098b2015-08-10 09:00:431311if (!is_ios) {
1312 executable("quic_client") {
1313 sources = [
1314 "tools/quic/quic_simple_client_bin.cc",
1315 ]
1316 deps = [
1317 ":net",
1318 ":simple_quic_tools",
1319 "//base",
brettwba7a73d2015-08-31 22:17:391320 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:071321 "//build/win:default_exe_manifest",
sherouk51b4b098b2015-08-10 09:00:431322 "//url",
1323 ]
1324 }
1325 executable("quic_server") {
1326 sources = [
1327 "tools/quic/quic_simple_server_bin.cc",
1328 ]
1329 deps = [
1330 ":net",
1331 ":simple_quic_tools",
1332 "//base",
brettwba7a73d2015-08-31 22:17:391333 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:071334 "//build/win:default_exe_manifest",
sherouk51b4b098b2015-08-10 09:00:431335 "//third_party/boringssl",
1336 "//third_party/protobuf:protobuf_lite",
1337 ]
1338 }
rchf80f62d12016-05-11 00:47:311339 executable("quic_packet_printer") {
1340 sources = [
1341 "tools/quic/quic_packet_printer_bin.cc",
1342 ]
1343 deps = [
1344 ":net",
1345 ":simple_quic_tools",
1346 "//base",
1347 "//build/config/sanitizers:deps",
1348 "//build/win:default_exe_manifest",
1349 "//third_party/boringssl",
1350 "//third_party/protobuf:protobuf_lite",
1351 ]
1352 }
danzh1401f0a2016-05-19 13:41:101353 executable("crypto_message_printer") {
1354 sources = [
1355 "tools/quic/crypto_message_printer_bin.cc",
1356 ]
1357 deps = [
1358 ":net",
1359 "//base",
1360 "//build/config/sanitizers:deps",
1361 "//build/win:default_exe_manifest",
1362 ]
1363 }
rch216445c2015-03-27 00:23:281364}
1365
sdefresneb0a31642016-03-18 11:04:451366bundle_data("net_unittests_bundle_data") {
1367 testonly = true
sdefresne04f91142016-04-21 08:41:591368 sources = gypi_values.net_unittests_data_sources
sdefresneb0a31642016-03-18 11:04:451369 outputs = [
1370 "{{bundle_resources_dir}}/" +
1371 "{{source_root_relative_dir}}/{{source_file_part}}",
1372 ]
1373}
1374
dpranke64df2832015-07-31 22:33:361375test("net_unittests") {
1376 sources = gypi_values.net_test_sources
1377
1378 configs += [
1379 "//build/config:precompiled_headers",
1380
1381 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1382 "//build/config/compiler:no_size_t_to_int_warning",
1383 ]
1384 defines = []
1385
1386 deps = [
1387 ":balsa",
1388 ":extras",
dpranke64df2832015-07-31 22:33:361389 ":net",
sdefresneb0a31642016-03-18 11:04:451390 ":net_unittests_bundle_data",
dpranke64df2832015-07-31 22:33:361391 ":simple_quic_tools",
ricea7afa5232015-12-01 20:55:231392 ":stale_while_revalidate_experiment_domains",
dpranke64df2832015-07-31 22:33:361393 ":test_support",
1394 "//base",
1395 "//base:i18n",
dpranke64df2832015-07-31 22:33:361396 "//base/third_party/dynamic_annotations",
1397 "//crypto",
1398 "//crypto:platform",
1399 "//crypto:test_support",
dpranke64df2832015-07-31 22:33:361400 "//net/base/registry_controlled_domains",
1401 "//sql",
1402 "//testing/gmock",
1403 "//testing/gtest",
1404 "//third_party/zlib",
1405 "//url",
kapishnikovabe280e2016-04-14 19:07:161406 "//url:url_features",
dpranke64df2832015-07-31 22:33:361407 ]
1408
1409 data = [
1410 "data/",
1411 ]
svaldez2135be52016-04-20 16:34:531412 data_deps = [
1413 "third_party/nist-pkits/",
1414 ]
dpranke64df2832015-07-31 22:33:361415
1416 if (is_linux || is_mac || is_win) {
1417 deps += [
1418 "//third_party/pyftpdlib/",
1419 "//third_party/pywebsocket/",
1420 "//third_party/tlslite/",
1421 ]
mattm6586b432016-02-12 04:52:391422 data_deps += [
dpranke64df2832015-07-31 22:33:361423 "//third_party/pyftpdlib/",
1424 "//third_party/pywebsocket/",
1425 "//third_party/tlslite/",
1426 ]
1427 data += [
1428 "tools/testserver/",
1429 "//third_party/pyftpdlib/",
1430 "//third_party/pywebsocket/",
1431 "//third_party/tlslite/",
1432 "$root_out_dir/pyproto/google/",
dprankef497c7962015-07-31 19:46:231433 ]
1434 }
1435
dpranke64df2832015-07-31 22:33:361436 if (is_desktop_linux) {
1437 deps += [ ":epoll_quic_tools" ]
1438 }
1439 if (is_linux) {
1440 sources += gypi_values.net_linux_test_sources
1441 deps += [
1442 ":epoll_quic_tools",
1443 ":epoll_server",
1444 ":flip_in_mem_edsm_server_base",
brettwbc8b2a22015-07-28 18:24:421445 ]
dpranke64df2832015-07-31 22:33:361446 }
[email protected]8a3f8242014-06-05 18:05:121447
dpranke64df2832015-07-31 22:33:361448 if (is_mac || is_ios) {
1449 sources += gypi_values.net_base_test_mac_ios_sources
1450 }
1451
1452 if (is_chromeos) {
1453 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1454 }
1455
1456 if (v8_use_external_startup_data) {
1457 deps += [ "//gin" ]
1458 }
1459
1460 if (!use_nss_certs) {
1461 sources -= [
1462 "cert/nss_cert_database_unittest.cc",
1463 "ssl/client_cert_store_nss_unittest.cc",
[email protected]8a3f8242014-06-05 18:05:121464 ]
dpranke64df2832015-07-31 22:33:361465 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
davidben2bcbc6b2015-04-22 02:36:411466 sources -= [
dpranke64df2832015-07-31 22:33:361467 "cert/nss_cert_database_chromeos_unittest.cc",
1468 "cert/nss_profile_filter_chromeos_unittest.cc",
davidben2bcbc6b2015-04-22 02:36:411469 ]
brettw43ae0e12015-07-14 22:12:361470 }
[email protected]8a3f8242014-06-05 18:05:121471 }
dpranke64df2832015-07-31 22:33:361472
dpranke64df2832015-07-31 22:33:361473 if (use_kerberos) {
1474 defines += [ "USE_KERBEROS" ]
1475 }
1476
1477 # These are excluded on Android, because the actual Kerberos support, which
1478 # these test, is in a separate app on Android.
1479 if (!use_kerberos || is_android) {
1480 sources -= [
1481 "http/http_auth_gssapi_posix_unittest.cc",
1482 "http/mock_gssapi_library_posix.cc",
1483 "http/mock_gssapi_library_posix.h",
1484 ]
1485 }
1486 if (!use_kerberos) {
1487 sources -= [ "http/http_auth_handler_negotiate_unittest.cc" ]
1488 }
1489
svaldez2135be52016-04-20 16:34:531490 if (!use_nss_certs) {
svaldeza1714ab2016-03-18 20:47:531491 # Only include this test when using NSS for cert verification.
dpranke64df2832015-07-31 22:33:361492 sources -= [ "cert_net/nss_ocsp_unittest.cc" ]
1493 }
1494
1495 if (!use_openssl_certs) {
1496 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1497 }
1498
jbudorick1273a842016-04-01 19:50:051499 if (enable_websockets) {
1500 sources += gypi_values.net_websockets_test_sources
1501 deps += [ ":http_server" ]
dpranke64df2832015-07-31 22:33:361502 }
1503
1504 if (disable_file_support) {
1505 sources -= [
1506 "base/directory_lister_unittest.cc",
Thiago Farinad673bb122016-01-06 23:18:161507 "base/directory_listing_unittest.cc",
shahriar.rostamia8c06daf2016-02-12 00:07:041508 "url_request/url_request_file_dir_job_unittest.cc",
dpranke64df2832015-07-31 22:33:361509 "url_request/url_request_file_job_unittest.cc",
1510 ]
1511 }
1512
1513 if (disable_ftp_support) {
1514 sources -= [
1515 "ftp/ftp_auth_cache_unittest.cc",
1516 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1517 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
dpranke64df2832015-07-31 22:33:361518 "ftp/ftp_directory_listing_parser_unittest.cc",
1519 "ftp/ftp_directory_listing_parser_unittest.h",
1520 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1521 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1522 "ftp/ftp_network_transaction_unittest.cc",
1523 "ftp/ftp_util_unittest.cc",
1524 "url_request/url_request_ftp_job_unittest.cc",
1525 ]
1526 }
1527
1528 if (!enable_built_in_dns) {
1529 sources -= [
1530 "dns/address_sorter_posix_unittest.cc",
1531 "dns/address_sorter_unittest.cc",
1532 ]
1533 }
1534
xunjieli905496a2015-08-31 15:51:171535 if (use_v8_in_net) {
dpranke64df2832015-07-31 22:33:361536 deps += [ ":net_with_v8" ]
1537 } else {
1538 sources -= [
1539 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1540 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc",
1541 "proxy/proxy_resolver_v8_unittest.cc",
1542 ]
1543 }
1544
1545 if (use_v8_in_net && !is_android) {
1546 deps += [
1547 ":net_browser_services",
1548 ":net_utility_services",
rockotc637caf9b2016-02-10 09:57:081549 "//mojo/edk/system",
dpranke64df2832015-07-31 22:33:361550 ]
1551 } else {
1552 sources -= [
1553 "dns/host_resolver_mojo_unittest.cc",
1554 "dns/mojo_host_resolver_impl_unittest.cc",
1555 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
1556 "proxy/mojo_proxy_resolver_impl_unittest.cc",
1557 "proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc",
1558 "proxy/proxy_resolver_factory_mojo_unittest.cc",
1559 "proxy/proxy_service_mojo_unittest.cc",
1560 ]
1561 }
1562
1563 if (!enable_mdns) {
1564 sources -= [
1565 "dns/mdns_cache_unittest.cc",
1566 "dns/mdns_client_unittest.cc",
1567 "dns/record_parsed_unittest.cc",
1568 "dns/record_rdata_unittest.cc",
1569 ]
1570 }
1571
1572 if (is_ios) {
dpranke64df2832015-07-31 22:33:361573 sources -= [
1574 # TODO(droger): The following tests are disabled because the
1575 # implementation is missing or incomplete.
1576 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1577 "base/keygen_handler_unittest.cc",
1578 "disk_cache/backend_unittest.cc",
1579 "disk_cache/blockfile/block_files_unittest.cc",
1580
1581 # Need to read input data files.
1582 "filter/gzip_filter_unittest.cc",
1583 "socket/ssl_server_socket_unittest.cc",
1584 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1585
1586 # Need TestServer.
1587 "cert_net/cert_net_fetcher_impl_unittest.cc",
1588 "proxy/proxy_script_fetcher_impl_unittest.cc",
1589 "socket/ssl_client_socket_unittest.cc",
1590 "url_request/url_fetcher_impl_unittest.cc",
1591 "url_request/url_request_context_builder_unittest.cc",
1592
1593 # Needs GetAppOutput().
1594 "test/python_utils_unittest.cc",
1595
1596 # The following tests are disabled because they don't apply to
1597 # iOS.
1598 # OS is not "linux" or "freebsd" or "openbsd".
1599 "socket/unix_domain_client_socket_posix_unittest.cc",
1600 "socket/unix_domain_server_socket_posix_unittest.cc",
dpranke64df2832015-07-31 22:33:361601 ]
1602 }
1603
kapishnikovabe280e2016-04-14 19:07:161604 # Unit tests that aren't supported by the current ICU alternatives on Android.
1605 if (is_android && use_platform_icu_alternatives) {
1606 sources -= [
1607 "base/filename_util_unittest.cc",
1608 "base/url_util_unittest.cc",
1609 "cert/x509_certificate_unittest.cc",
1610 "proxy/proxy_resolver_v8_unittest.cc",
1611 "url_request/url_request_job_unittest.cc",
1612 ]
1613 }
1614
1615 # Unit tests that are not supported by the current ICU alternatives on iOS.
1616 if (is_ios && use_platform_icu_alternatives) {
1617 sources -= [
1618 "base/filename_util_unittest.cc",
1619 "base/url_util_unittest.cc",
1620 "cert/x509_certificate_unittest.cc",
1621 "http/http_auth_handler_basic_unittest.cc",
1622 "http/http_auth_handler_digest_unittest.cc",
1623 "http/http_auth_handler_factory_unittest.cc",
1624 "http/http_auth_unittest.cc",
1625 "http/http_content_disposition_unittest.cc",
1626 "http/http_network_transaction_unittest.cc",
1627 "http/http_proxy_client_socket_pool_unittest.cc",
1628 "socket/ssl_client_socket_pool_unittest.cc",
1629 "spdy/spdy_network_transaction_unittest.cc",
1630 "spdy/spdy_proxy_client_socket_unittest.cc",
1631 "url_request/url_request_job_unittest.cc",
1632 "url_request/url_request_unittest.cc",
1633 ]
1634 }
1635
1636 # Exclude brotli test if the support for brotli is disabled.
1637 # Also, exclude the test from iOS for now (needs to read input data files).
1638 if (disable_brotli_filter || is_ios) {
1639 sources -= [ "filter/brotli_filter_unittest.cc" ]
1640 }
1641
dpranke64df2832015-07-31 22:33:361642 if (is_android) {
agrieve732db3a2016-04-26 19:18:191643 data_deps += [ "//net/tools/testserver:testserver_py" ]
agrieve97176362015-12-01 16:36:191644 deps += [
1645 ":net_test_jni_headers",
agrievea5517aa2015-10-23 03:03:451646 "//base:base_java_unittest_support",
1647 "//net/android:net_java",
agrievea5517aa2015-10-23 03:03:451648 "//net/android:net_java_test_support",
agrieve97176362015-12-01 16:36:191649 "//net/android:net_javatests",
agrievea5517aa2015-10-23 03:03:451650 "//net/android:net_unittests_apk_resources",
agrieve97176362015-12-01 16:36:191651
1652 # TODO(mmenke): This depends on test_support_base, which depends on
1653 # icu. Figure out a way to remove that dependency.
1654 "//testing/android/native_test:native_test_native_code",
pkotwicz8c7027d2015-11-11 06:30:071655 "//v8:v8_external_startup_data_assets",
agrievea5517aa2015-10-23 03:03:451656 ]
1657 android_manifest = "//net/android/unittest_support/AndroidManifest.xml"
dpranke64df2832015-07-31 22:33:361658 set_sources_assignment_filter([])
1659 sources += [ "base/address_tracker_linux_unittest.cc" ]
1660 set_sources_assignment_filter(sources_assignment_filter)
agrieve3ac557f02016-04-12 15:52:001661 shard_timeout = 300
dpranke64df2832015-07-31 22:33:361662 }
1663
dpranke64df2832015-07-31 22:33:361664 # Symbols for crashes when running tests on swarming.
1665 if (symbol_level > 0) {
1666 if (is_win) {
1667 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1668 } else if (is_mac) {
dprankede2945b82016-04-15 22:14:131669 # TODO(crbug.com/330301): make this conditional on mac_strip_release.
1670 # data += [ "$root_out_dir/net_unittests.dSYM/" ]
dpranke64df2832015-07-31 22:33:361671 }
1672 }
maksim.sisovc69619d2016-05-20 19:23:551673
1674 if (is_win) {
1675 libs = [
1676 "iphlpapi.lib",
1677 ]
1678 }
dpranke64df2832015-07-31 22:33:361679}
1680
1681# !is_android && !is_win && !is_mac
sdefresne3001f172016-03-16 10:30:031682if (!is_ios) {
1683 # TODO(crbug.com/594965): this should be converted to "app" template and
1684 # enabled on iOS too.
1685 executable("net_perftests") {
1686 testonly = true
1687 sources = [
1688 "base/mime_sniffer_perftest.cc",
1689 "cookies/cookie_monster_perftest.cc",
gavinpc28fe1122016-05-13 17:49:051690 "disk_cache/disk_cache_perftest.cc",
sdefresne3001f172016-03-16 10:30:031691 "extras/sqlite/sqlite_persistent_cookie_store_perftest.cc",
1692 "proxy/proxy_resolver_perftest.cc",
1693 "udp/udp_socket_perftest.cc",
1694 ]
[email protected]8a3f8242014-06-05 18:05:121695
sdefresne3001f172016-03-16 10:30:031696 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1697 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1698 deps = [
1699 ":extras",
1700 ":net",
1701 ":test_support",
1702 "//base",
1703 "//base:i18n",
1704 "//base/test:test_support_perf",
1705 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:071706 "//build/win:default_exe_manifest",
sdefresne3001f172016-03-16 10:30:031707 "//testing/gtest",
1708 "//url",
1709 ]
rockot9c67e5f2015-03-12 20:01:211710
sdefresne3001f172016-03-16 10:30:031711 if (enable_websockets) {
1712 sources += [ "websockets/websocket_frame_perftest.cc" ]
1713 }
rockot9c67e5f2015-03-12 20:01:211714
sdefresne3001f172016-03-16 10:30:031715 if (use_v8_in_net) {
1716 deps += [ ":net_with_v8" ]
1717 } else {
1718 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1719 }
rockot9c67e5f2015-03-12 20:01:211720 }
rockot9c67e5f2015-03-12 20:01:211721}
mefff34b822016-01-11 15:28:081722
eromanfe8659e2016-03-02 23:47:021723# Fuzzers
1724
eroman02b4fe562016-03-04 12:15:161725source_set("net_fuzzer_test_support") {
1726 testonly = true
1727
1728 sources = [
mmenkec951d412016-04-28 19:05:221729 "base/fuzzed_data_provider.cc",
1730 "base/fuzzed_data_provider.h",
eroman02b4fe562016-03-04 12:15:161731 "base/fuzzer_test_support.cc",
mmenke99b57172016-04-14 20:44:331732 "socket/fuzzed_socket.cc",
1733 "socket/fuzzed_socket.h",
mmenkec951d412016-04-28 19:05:221734 "socket/fuzzed_socket_factory.cc",
1735 "socket/fuzzed_socket_factory.h",
eroman02b4fe562016-03-04 12:15:161736 ]
1737 deps = [
1738 "//base",
1739 "//base:i18n",
mmenke99b57172016-04-14 20:44:331740 "//net",
eroman02b4fe562016-03-04 12:15:161741 ]
1742}
1743
csharrisonaa314dc2016-04-29 20:15:371744fuzzer_test("net_data_job_fuzzer") {
1745 sources = [
1746 "url_request/url_request_data_job_fuzzer.cc",
1747 ]
1748 deps = [
1749 ":net_fuzzer_test_support",
1750 ":test_support",
1751 "//base",
1752 "//net",
1753 ]
1754}
1755
mmenke5552a6a2016-03-28 23:11:591756fuzzer_test("net_mime_sniffer_fuzzer") {
1757 sources = [
1758 "base/mime_sniffer_fuzzer.cc",
1759 ]
1760 deps = [
1761 ":net_fuzzer_test_support",
1762 "//base",
1763 "//net",
1764 ]
1765}
1766
mmoroz565e8df22016-03-04 18:17:201767fuzzer_test("net_parse_proxy_list_pac_fuzzer") {
eromane6264fd2016-03-02 22:46:301768 sources = [
1769 "proxy/parse_proxy_list_pac_fuzzer.cc",
1770 ]
1771 deps = [
eroman02b4fe562016-03-04 12:15:161772 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301773 "//net",
1774 ]
1775}
1776
mmoroz565e8df22016-03-04 18:17:201777fuzzer_test("net_parse_proxy_list_fuzzer") {
eromane6264fd2016-03-02 22:46:301778 sources = [
1779 "proxy/parse_proxy_list_fuzzer.cc",
1780 ]
1781 deps = [
eroman02b4fe562016-03-04 12:15:161782 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301783 "//net",
1784 ]
1785}
1786
mmoroz565e8df22016-03-04 18:17:201787fuzzer_test("net_parse_proxy_bypass_rules_fuzzer") {
eromane6264fd2016-03-02 22:46:301788 sources = [
1789 "proxy/parse_proxy_bypass_rules_fuzzer.cc",
1790 ]
1791 deps = [
eroman02b4fe562016-03-04 12:15:161792 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301793 "//net",
1794 ]
1795}
1796
mmoroz565e8df22016-03-04 18:17:201797fuzzer_test("net_parse_proxy_rules_fuzzer") {
eromane6264fd2016-03-02 22:46:301798 sources = [
1799 "proxy/parse_proxy_rules_fuzzer.cc",
1800 ]
1801 deps = [
eroman02b4fe562016-03-04 12:15:161802 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301803 "//net",
1804 ]
1805}
1806
mmoroz565e8df22016-03-04 18:17:201807fuzzer_test("net_parse_data_url_fuzzer") {
eromane6264fd2016-03-02 22:46:301808 sources = [
1809 "base/parse_data_url_fuzzer.cc",
1810 ]
1811 deps = [
eroman02b4fe562016-03-04 12:15:161812 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301813 "//base",
1814 "//net",
1815 ]
1816}
1817
mmoroz565e8df22016-03-04 18:17:201818fuzzer_test("net_parse_ip_pattern_fuzzer") {
eromane6264fd2016-03-02 22:46:301819 sources = [
1820 "base/parse_ip_pattern_fuzzer.cc",
1821 ]
1822 deps = [
eroman02b4fe562016-03-04 12:15:161823 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301824 "//net",
1825 ]
1826}
1827
mmoroz565e8df22016-03-04 18:17:201828fuzzer_test("net_get_domain_and_registry_fuzzer") {
eromane6264fd2016-03-02 22:46:301829 sources = [
1830 "base/registry_controlled_domains/get_domain_and_registry_fuzzer.cc",
1831 ]
1832 deps = [
eroman02b4fe562016-03-04 12:15:161833 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301834 "//base",
eromane6264fd2016-03-02 22:46:301835 "//net",
1836 ]
1837}
1838
mattmafe43b82016-04-28 20:40:541839fuzzer_test("net_cert_verify_name_match_fuzzer") {
1840 sources = [
1841 "cert/internal/verify_name_match_fuzzer.cc",
1842 ]
1843 deps = [
1844 ":net_fuzzer_test_support",
1845 "//base",
1846 "//net",
1847 ]
1848}
1849
mattm2c637da42016-04-28 02:55:591850fuzzer_test("net_cert_normalize_name_fuzzer") {
1851 sources = [
1852 "cert/internal/verify_name_match_normalizename_fuzzer.cc",
1853 ]
1854 deps = [
1855 "//base",
1856 "//net",
1857 ]
1858}
1859
mattmafe43b82016-04-28 20:40:541860fuzzer_test("net_cert_verify_name_in_subtree_fuzzer") {
1861 sources = [
1862 "cert/internal/verify_name_match_verifynameinsubtree_fuzzer.cc",
1863 ]
1864 deps = [
1865 ":net_fuzzer_test_support",
1866 "//base",
1867 "//net",
1868 ]
1869}
1870
nharper85d3b6f2016-04-28 20:58:191871fuzzer_test("net_cert_parse_certificate_fuzzer") {
1872 sources = [
1873 "cert/internal/parse_certificate_fuzzer.cc",
1874 ]
1875 deps = [
1876 "//base",
1877 "//net",
1878 ]
1879}
1880
mmoroz565e8df22016-03-04 18:17:201881fuzzer_test("net_parse_cookie_line_fuzzer") {
eromane6264fd2016-03-02 22:46:301882 sources = [
1883 "cookies/parse_cookie_line_fuzzer.cc",
1884 ]
1885 deps = [
eroman02b4fe562016-03-04 12:15:161886 ":net_fuzzer_test_support",
eromane6264fd2016-03-02 22:46:301887 "//net",
1888 ]
1889}
1890
mmoroz565e8df22016-03-04 18:17:201891fuzzer_test("net_dns_record_fuzzer") {
eromanfe8659e2016-03-02 23:47:021892 sources = [
1893 "dns/dns_record_fuzzer.cc",
1894 ]
1895 deps = [
eroman02b4fe562016-03-04 12:15:161896 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:021897 "//base",
1898 "//net",
1899 ]
1900}
1901
zhongyi273af9f2016-04-28 18:46:341902fuzzer_test("net_dns_hosts_parse_fuzzer") {
1903 sources = [
1904 "dns/dns_hosts_parse_fuzzer.cc",
1905 ]
1906 deps = [
1907 ":net_fuzzer_test_support",
1908 "//base",
1909 "//net",
1910 ]
1911}
1912
mmenke44e8e9c2016-03-29 18:38:571913fuzzer_test("net_http_stream_parser_fuzzer") {
1914 sources = [
1915 "http/http_stream_parser_fuzzer.cc",
1916 ]
1917 deps = [
1918 ":net_fuzzer_test_support",
1919 ":test_support",
1920 "//base",
1921 "//net",
1922 ]
mmenkee15732f2016-04-18 18:47:491923 dict = "data/http/http.dict"
mmenke44e8e9c2016-03-29 18:38:571924}
1925
mmoroz565e8df22016-03-04 18:17:201926fuzzer_test("net_ftp_ctrl_response_fuzzer") {
eromanfe8659e2016-03-02 23:47:021927 sources = [
1928 "ftp/ftp_ctrl_response_fuzzer.cc",
1929 ]
1930 deps = [
eroman02b4fe562016-03-04 12:15:161931 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:021932 "//base",
1933 "//net",
1934 ]
1935}
1936
mmoroz565e8df22016-03-04 18:17:201937fuzzer_test("net_ftp_directory_listing_fuzzer") {
eromanfe8659e2016-03-02 23:47:021938 sources = [
1939 "ftp/ftp_directory_listing_fuzzer.cc",
1940 ]
1941 deps = [
eroman02b4fe562016-03-04 12:15:161942 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:021943 "//base",
eromanfe8659e2016-03-02 23:47:021944 "//net",
1945 ]
1946}
1947
mmoroz565e8df22016-03-04 18:17:201948fuzzer_test("net_unescape_url_component_fuzzer") {
eromanfe8659e2016-03-02 23:47:021949 sources = [
1950 "base/unescape_url_component_fuzzer.cc",
1951 ]
1952 deps = [
eroman02b4fe562016-03-04 12:15:161953 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:021954 "//base",
1955 "//net",
1956 ]
mmoroz34eb0082016-03-11 14:32:011957 dict = "base/unescape_url_component_fuzzer.dict"
mmoroz062a4a62016-04-12 09:02:331958 libfuzzer_options = [ "max_len = 2048" ]
eromanfe8659e2016-03-02 23:47:021959}
1960
mmoroz565e8df22016-03-04 18:17:201961fuzzer_test("net_websocket_frame_parser_fuzzer") {
eromanfe8659e2016-03-02 23:47:021962 sources = [
1963 "websockets/websocket_frame_parser_fuzzer.cc",
1964 ]
1965 deps = [
eroman02b4fe562016-03-04 12:15:161966 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:021967 "//net",
1968 ]
1969}
1970
mmoroz565e8df22016-03-04 18:17:201971fuzzer_test("net_http_chunked_decoder_fuzzer") {
eromanfe8659e2016-03-02 23:47:021972 sources = [
1973 "http/http_chunked_decoder_fuzzer.cc",
1974 ]
1975 deps = [
eroman02b4fe562016-03-04 12:15:161976 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:021977 "//net",
1978 ]
mmoroz5fa27922016-03-22 19:42:191979 dict = "http/http_chunked_decoder_fuzzer.dict"
eromanfe8659e2016-03-02 23:47:021980}
1981
mmenke8e9314bc2016-04-15 21:45:021982fuzzer_test("net_http_proxy_client_socket_fuzzer") {
1983 sources = [
1984 "http/http_proxy_client_socket_fuzzer.cc",
1985 ]
1986 deps = [
1987 ":net_fuzzer_test_support",
1988 ":test_support",
1989 "//base",
1990 "//net",
1991 ]
mmenkee15732f2016-04-18 18:47:491992 dict = "data/http/http.dict"
mmenke8e9314bc2016-04-15 21:45:021993}
1994
mmoroz565e8df22016-03-04 18:17:201995fuzzer_test("net_quic_crypto_framer_parse_message_fuzzer") {
eromanfe8659e2016-03-02 23:47:021996 sources = [
1997 "quic/quic_crypto_framer_parse_message_fuzzer.cc",
1998 ]
1999 deps = [
eroman02b4fe562016-03-04 12:15:162000 ":net_fuzzer_test_support",
eromanfe8659e2016-03-02 23:47:022001 "//base",
2002 "//net",
2003 ]
2004}
mmenke99b57172016-04-14 20:44:332005
2006fuzzer_test("net_socks_client_socket_fuzzer") {
2007 sources = [
2008 "socket/socks_client_socket_fuzzer.cc",
2009 ]
2010 deps = [
2011 ":net_fuzzer_test_support",
2012 ":test_support",
2013 "//base",
2014 "//net",
2015 ]
2016}
2017
2018fuzzer_test("net_socks5_client_socket_fuzzer") {
2019 sources = [
2020 "socket/socks5_client_socket_fuzzer.cc",
2021 ]
2022 deps = [
2023 ":net_fuzzer_test_support",
2024 ":test_support",
2025 "//base",
2026 "//net",
2027 ]
2028}
mmenkec951d412016-04-28 19:05:222029
2030fuzzer_test("net_url_request_fuzzer") {
2031 sources = [
2032 "url_request/url_request_fuzzer.cc",
2033 ]
2034 deps = [
2035 ":net_fuzzer_test_support",
2036 ":test_support",
2037 "//base",
2038 "//net",
2039 ]
2040 dict = "data/http/http.dict"
2041}