summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/SConscript.googleurl12
-rw-r--r--build/SConscript.main10
-rw-r--r--net/SConscript366
-rw-r--r--net/url_request/url_request_unittest.cc4
4 files changed, 208 insertions, 184 deletions
diff --git a/build/SConscript.googleurl b/build/SConscript.googleurl
index 9998c885..d2ed563 100644
--- a/build/SConscript.googleurl
+++ b/build/SConscript.googleurl
@@ -43,12 +43,15 @@ env.Append(
CPPDEFINES = [
'U_STATIC_IMPLEMENTATION',
],
-
- CCFLAGS = [
- '/TP',
- ],
)
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/TP',
+ ],
+ )
+
input_files = [
'src/gurl.cc',
'src/url_canon_etc.cc',
@@ -90,4 +93,3 @@ env.ChromeStaticLibrary('googleurl', input_files)
#]
#
#env_tests.ChromeStaticLibrary('googleurl_tests', test_files)
-
diff --git a/build/SConscript.main b/build/SConscript.main
index d687f67..3f7623f 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -321,7 +321,15 @@ elif env['PLATFORM'] == 'posix':
SetOption('num_jobs', cpus + 1)
# For now, linux only loads the components we know work on Linux, by default.
- load = ['base', 'testing', 'third_party', 'breakpad', 'skia']
+ load = [
+ 'base',
+ 'breakpad',
+ 'googleurl',
+ 'net',
+ 'skia',
+ 'testing',
+ 'third_party',
+ ]
env.Replace(
# TODO(linux): we should also compile with -Werror, but not yet.
diff --git a/net/SConscript b/net/SConscript
index a66dbb59..bf603ab 100644
--- a/net/SConscript
+++ b/net/SConscript
@@ -52,88 +52,88 @@ env.Append(
# These net files work on *all* platforms; files that don't work
# cross-platforom live below.
input_files = [
+ 'base/net_errors.cc',
]
if env['PLATFORM'] == 'win32':
input_files.extend([
- 'base/address_list.cc',
- 'base/auth_cache.cc',
- 'base/base64.cc',
- 'base/bzip2_filter.cc',
- 'base/client_socket_factory.cc',
- 'base/client_socket_handle.cc',
- 'base/client_socket_pool.cc',
- 'base/cookie_monster.cc',
- 'base/cookie_policy.cc',
- 'base/data_url.cc',
- 'base/directory_lister.cc',
- 'base/dns_resolution_observer.cc',
- 'base/escape.cc',
- 'base/ev_root_ca_metadata.cc',
- 'base/filter.cc',
- 'base/gzip_filter.cc',
- 'base/gzip_header.cc',
- 'base/host_resolver.cc',
- 'base/listen_socket.cc',
- 'base/mime_sniffer.cc',
- 'base/mime_util.cc',
- 'base/net_errors.cc',
- 'base/net_module.cc',
- 'base/net_util.cc',
- 'base/platform_mime_util_win.cc',
- 'base/registry_controlled_domain.cc',
- 'base/ssl_client_socket.cc',
- 'base/ssl_config_service.cc',
- 'base/tcp_client_socket.cc',
- 'base/telnet_server.cc',
- 'base/upload_data.cc',
- 'base/upload_data_stream.cc',
- 'base/wininet_util.cc',
- 'base/winsock_init.cc',
- 'base/x509_certificate.cc',
- 'disk_cache/backend_impl.cc',
- 'disk_cache/block_files.cc',
- 'disk_cache/entry_impl.cc',
- 'disk_cache/file.cc',
- 'disk_cache/file_lock.cc',
- 'disk_cache/hash.cc',
- 'disk_cache/mapped_file.cc',
- 'disk_cache/mem_backend_impl.cc',
- 'disk_cache/mem_entry_impl.cc',
- 'disk_cache/mem_rankings.cc',
- 'disk_cache/rankings.cc',
- 'disk_cache/stats.cc',
- 'disk_cache/trace.cc',
- 'http/cert_status_cache.cc',
- 'http/http_chunked_decoder.cc',
- 'http/http_cache.cc',
- 'http/http_network_layer.cc',
- 'http/http_network_transaction.cc',
- 'http/http_response_headers.cc',
- 'http/http_transaction_winhttp.cc',
- 'http/http_util.cc',
- 'http/http_vary_data.cc',
- 'http/winhttp_request_throttle.cc',
- 'proxy/proxy_resolver_fixed.cc',
- 'proxy/proxy_resolver_winhttp.cc',
- 'proxy/proxy_service.cc',
- 'url_request/mime_sniffer_proxy.cc',
- 'url_request/url_request.cc',
- 'url_request/url_request_about_job.cc',
- 'url_request/url_request_error_job.cc',
- 'url_request/url_request_file_dir_job.cc',
- 'url_request/url_request_file_job.cc',
- 'url_request/url_request_filter.cc',
- 'url_request/url_request_ftp_job.cc',
- 'url_request/url_request_http_job.cc',
- 'url_request/url_request_inet_job.cc',
- 'url_request/url_request_job.cc',
- 'url_request/url_request_job_manager.cc',
- 'url_request/url_request_job_metrics.cc',
- 'url_request/url_request_job_tracker.cc',
- 'url_request/url_request_simple_job.cc',
- 'url_request/url_request_test_job.cc',
- 'url_request/url_request_view_cache_job.cc',
+ 'base/address_list.cc',
+ 'base/auth_cache.cc',
+ 'base/base64.cc',
+ 'base/bzip2_filter.cc',
+ 'base/client_socket_factory.cc',
+ 'base/client_socket_handle.cc',
+ 'base/client_socket_pool.cc',
+ 'base/cookie_monster.cc',
+ 'base/cookie_policy.cc',
+ 'base/data_url.cc',
+ 'base/directory_lister.cc',
+ 'base/dns_resolution_observer.cc',
+ 'base/escape.cc',
+ 'base/ev_root_ca_metadata.cc',
+ 'base/filter.cc',
+ 'base/gzip_filter.cc',
+ 'base/gzip_header.cc',
+ 'base/host_resolver.cc',
+ 'base/listen_socket.cc',
+ 'base/mime_sniffer.cc',
+ 'base/mime_util.cc',
+ 'base/net_module.cc',
+ 'base/net_util.cc',
+ 'base/platform_mime_util_win.cc',
+ 'base/registry_controlled_domain.cc',
+ 'base/ssl_client_socket.cc',
+ 'base/ssl_config_service.cc',
+ 'base/tcp_client_socket.cc',
+ 'base/telnet_server.cc',
+ 'base/upload_data.cc',
+ 'base/upload_data_stream.cc',
+ 'base/wininet_util.cc',
+ 'base/winsock_init.cc',
+ 'base/x509_certificate.cc',
+ 'disk_cache/backend_impl.cc',
+ 'disk_cache/block_files.cc',
+ 'disk_cache/entry_impl.cc',
+ 'disk_cache/file.cc',
+ 'disk_cache/file_lock.cc',
+ 'disk_cache/hash.cc',
+ 'disk_cache/mapped_file.cc',
+ 'disk_cache/mem_backend_impl.cc',
+ 'disk_cache/mem_entry_impl.cc',
+ 'disk_cache/mem_rankings.cc',
+ 'disk_cache/rankings.cc',
+ 'disk_cache/stats.cc',
+ 'disk_cache/trace.cc',
+ 'http/cert_status_cache.cc',
+ 'http/http_chunked_decoder.cc',
+ 'http/http_cache.cc',
+ 'http/http_network_layer.cc',
+ 'http/http_network_transaction.cc',
+ 'http/http_response_headers.cc',
+ 'http/http_transaction_winhttp.cc',
+ 'http/http_util.cc',
+ 'http/http_vary_data.cc',
+ 'http/winhttp_request_throttle.cc',
+ 'proxy/proxy_resolver_fixed.cc',
+ 'proxy/proxy_resolver_winhttp.cc',
+ 'proxy/proxy_service.cc',
+ 'url_request/mime_sniffer_proxy.cc',
+ 'url_request/url_request.cc',
+ 'url_request/url_request_about_job.cc',
+ 'url_request/url_request_error_job.cc',
+ 'url_request/url_request_file_dir_job.cc',
+ 'url_request/url_request_file_job.cc',
+ 'url_request/url_request_filter.cc',
+ 'url_request/url_request_ftp_job.cc',
+ 'url_request/url_request_http_job.cc',
+ 'url_request/url_request_inet_job.cc',
+ 'url_request/url_request_job.cc',
+ 'url_request/url_request_job_manager.cc',
+ 'url_request/url_request_job_metrics.cc',
+ 'url_request/url_request_job_tracker.cc',
+ 'url_request/url_request_simple_job.cc',
+ 'url_request/url_request_test_job.cc',
+ 'url_request/url_request_view_cache_job.cc',
])
if env['PLATFORM'] == 'win32':
@@ -149,20 +149,24 @@ if env['PLATFORM'] == 'win32':
if env['PLATFORM'] in ('darwin', 'posix'):
input_files.extend([
- 'disk_cache/cache_util_posix.cc',
- 'disk_cache/os_file_posix.cc',
+ # Not quite ready for these, they still pull in net_util.h which
+ # includes <windows.h>.
+ #'disk_cache/cache_util_posix.cc',
+ #'disk_cache/os_file_posix.cc',
])
-# TODO(bradnelson): This step generates file precompiled_net.pch.ib_tag
-# possibly only on incredibuild, scons doesn't know this.
-env_p = env.Clone()
-env_p.Append(CCFLAGS='/Ylnet')
-pch, obj = env_p.PCH('precompiled_net.pch', 'build/precompiled_net.cc')
-env['PCH'] = pch
-env['PCHSTOP'] = 'precompiled_net.h'
-env.Append(CCPCHFLAGS = ['/FIprecompiled_net.h'])
+if env['PLATFORM'] == 'win32':
+ # TODO(bradnelson): This step generates file precompiled_net.pch.ib_tag
+ # possibly only on incredibuild, scons doesn't know this.
+ env_p = env.Clone()
+ env_p.Append(CCFLAGS='/Ylnet')
+ pch, obj = env_p.PCH('precompiled_net.pch', 'build/precompiled_net.cc')
+ env['PCH'] = pch
+ env['PCHSTOP'] = 'precompiled_net.h'
+ env.Append(CCPCHFLAGS = ['/FIprecompiled_net.h'])
+ input_files += [obj]
-env.ChromeStaticLibrary('net', input_files + [obj])
+env.ChromeStaticLibrary('net', input_files)
env_tests.Prepend(
@@ -216,107 +220,117 @@ if env['PLATFORM'] == 'win32':
unittest_files = [
- 'base/auth_cache_unittest.cc',
- 'base/base64_unittest.cc',
- 'base/bzip2_filter_unittest.cc',
- 'base/client_socket_pool_unittest.cc',
- 'base/cookie_monster_unittest.cc',
- 'base/cookie_policy_unittest.cc',
- 'base/data_url_unittest.cc',
- 'base/directory_lister_unittest.cc',
- 'base/escape_unittest.cc',
- 'base/gzip_filter_unittest.cc',
- 'base/mime_sniffer_unittest.cc',
- 'base/mime_util_unittest.cc',
- 'base/net_util_unittest.cc',
- 'base/registry_controlled_domain_unittest.cc',
- 'base/ssl_config_service_unittest.cc',
- 'base/ssl_client_socket_unittest.cc',
- 'base/tcp_client_socket_unittest.cc',
- 'base/wininet_util_unittest.cc',
- 'disk_cache/addr_unittest.cc',
- 'disk_cache/backend_unittest.cc',
- 'disk_cache/block_files_unittest.cc',
- 'disk_cache/disk_cache_test_base.cc',
- 'disk_cache/disk_cache_test_util.cc',
- 'disk_cache/entry_unittest.cc',
- 'disk_cache/mapped_file_unittest.cc',
- 'disk_cache/storage_block_unittest.cc',
- 'http/http_cache_unittest.cc',
- 'http/http_network_layer_unittest.cc',
- 'http/http_network_transaction_unittest.cc',
- 'http/http_response_headers_unittest.cc',
- 'http/http_transaction_unittest.cc',
- 'http/http_transaction_winhttp_unittest.cc',
- 'http/http_util_unittest.cc',
- 'http/http_vary_data_unittest.cc',
- 'http/winhttp_request_throttle_unittest.cc',
- 'url_request/url_request_unittest.cc',
- '$BASE_DIR/run_all_unittests.obj',
+ '$BASE_DIR/run_all_unittests$OBJSUFFIX',
]
-net_unittests = env_tests.ChromeTestProgram('net_unittests', unittest_files)
+if env['PLATFORM'] == 'win32':
+ unittest_files.extend([
+ 'base/auth_cache_unittest.cc',
+ 'base/base64_unittest.cc',
+ 'base/bzip2_filter_unittest.cc',
+ 'base/client_socket_pool_unittest.cc',
+ 'base/cookie_monster_unittest.cc',
+ 'base/cookie_policy_unittest.cc',
+ 'base/data_url_unittest.cc',
+ 'base/directory_lister_unittest.cc',
+ 'base/escape_unittest.cc',
+ 'base/gzip_filter_unittest.cc',
+ 'base/mime_sniffer_unittest.cc',
+ 'base/mime_util_unittest.cc',
+ 'base/net_util_unittest.cc',
+ 'base/registry_controlled_domain_unittest.cc',
+ 'base/ssl_config_service_unittest.cc',
+ 'base/ssl_client_socket_unittest.cc',
+ 'base/tcp_client_socket_unittest.cc',
+ 'base/wininet_util_unittest.cc',
+ 'disk_cache/addr_unittest.cc',
+ 'disk_cache/backend_unittest.cc',
+ 'disk_cache/block_files_unittest.cc',
+ 'disk_cache/disk_cache_test_base.cc',
+ 'disk_cache/disk_cache_test_util.cc',
+ 'disk_cache/entry_unittest.cc',
+ 'disk_cache/mapped_file_unittest.cc',
+ 'disk_cache/storage_block_unittest.cc',
+ 'http/http_cache_unittest.cc',
+ 'http/http_network_layer_unittest.cc',
+ 'http/http_network_transaction_unittest.cc',
+ 'http/http_response_headers_unittest.cc',
+ 'http/http_transaction_unittest.cc',
+ 'http/http_transaction_winhttp_unittest.cc',
+ 'http/http_util_unittest.cc',
+ 'http/http_vary_data_unittest.cc',
+ 'http/winhttp_request_throttle_unittest.cc',
+ 'url_request/url_request_unittest.cc',
+ ])
+net_unittests = env_tests.ChromeTestProgram('net_unittests', unittest_files)
+install_targets = net_unittests[:]
-stress_cache = env_tests.ChromeTestProgram(
- 'stress_cache',
- ['disk_cache/stress_cache.cc',
- 'disk_cache/disk_cache_test_util.cc']
-)
-
+if env['PLATFORM'] == 'win32':
+ stress_cache = env_tests.ChromeTestProgram(
+ 'stress_cache',
+ ['disk_cache/stress_cache.cc',
+ 'disk_cache/disk_cache_test_util.cc']
+ )
-crash_cache = env_tests.ChromeTestProgram(
- 'crash_cache',
- ['tools/crash_cache/crash_cache.cc',
- 'disk_cache/disk_cache_test_util.cc']
-)
+ crash_cache = env_tests.ChromeTestProgram(
+ 'crash_cache',
+ ['tools/crash_cache/crash_cache.cc',
+ 'disk_cache/disk_cache_test_util.cc']
+ )
+ net_perftests = env_tests.ChromeTestProgram(
+ 'net_perftests',
+ ['disk_cache/disk_cache_test_util.cc',
+ 'disk_cache/disk_cache_perftest.cc',
+ 'base/cookie_monster_perftest.cc',
+ # TODO(sgk): avoid using .cc from base directly
+ '$BASE_DIR/run_all_perftests$OBJSUFFIX',
+ '$BASE_DIR/perftimer$OBJSUFFIX']
+ )
-net_perftests = env_tests.ChromeTestProgram(
- 'net_perftests',
- ['disk_cache/disk_cache_test_util.cc',
- 'disk_cache/disk_cache_perftest.cc',
- 'base/cookie_monster_perftest.cc',
- # TODO(sgk): avoid using .cc from base directly
- '$BASE_DIR/run_all_perftests$OBJSUFFIX',
- '$BASE_DIR/perftimer$OBJSUFFIX']
-)
+ install_targets.extend([
+ stress_cache,
+ crash_cache,
+ net_perftests,
+ ])
# Create install of tests.
-installed_tests = env.Install(
- '$TARGET_ROOT',
- net_unittests + stress_cache + crash_cache + net_perftests
-)
+installed_tests = env.Install('$TARGET_ROOT', install_targets)
-env_res.Append(
- CPPPATH = [
- '..',
- ],
- RCFLAGS = [
- ['/l', '0x409'],
- ],
-)
-
-# This dat file needed by net_resources is generated.
-tld_names_clean = env_res.Command('net/effective_tld_names_clean.dat',
- ['base/effective_tld_names.dat',
- 'tools/tld_cleanup/tld_cleanup.exe'],
- '${SOURCES[1]} ${SOURCES[0]} $TARGET')
-rc = env_res.Command('net_resources.rc',
- 'base/net_resources.rc',
- Copy('$TARGET', '$SOURCE'))
-net_resources = env_res.RES(rc)
-env_res.Depends(rc, tld_names_clean)
-
-
-sconscript_files = [
- 'tools/tld_cleanup/SConscript',
-]
+if env['PLATFORM'] == 'win32':
+ env_res.Append(
+ CPPPATH = [
+ '..',
+ ],
+ RCFLAGS = [
+ ['/l', '0x409'],
+ ],
+ )
-SConscript(sconscript_files, exports=['env'])
+ # TODO: Need to figure out what we're doing with external resources on
+ # linux.
+ # This dat file needed by net_resources is generated.
+ tld_names_clean = env_res.Command('net/effective_tld_names_clean.dat',
+ ['base/effective_tld_names.dat',
+ 'tools/tld_cleanup/tld_cleanup.exe'],
+ '${SOURCES[1]} ${SOURCES[0]} $TARGET')
+ rc = env_res.Command('net_resources.rc',
+ 'base/net_resources.rc',
+ Copy('$TARGET', '$SOURCE'))
+ net_resources = env_res.RES(rc)
+ env_res.Depends(rc, tld_names_clean)
+
+ # TODO: We need to port tld_cleanup before this will work on other
+ # platforms.
+ sconscript_files = [
+ 'tools/tld_cleanup/SConscript',
+ ]
+
+ SConscript(sconscript_files, exports=['env'])
# Setup alias for building all parts of net.
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 0ce504b..4520466 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -507,7 +507,7 @@ TEST(URLRequestTest, BZip2ContentTest) {
const std::string& got_bz2_content = d2.data_received();
// compare those two results
- EXPECT_TRUE(got_content == got_bz2_content);
+ EXPECT_EQ(got_content, got_bz2_content);
}
TEST(URLRequestTest, BZip2ContentTest_IncrementalHeader) {
@@ -532,7 +532,7 @@ TEST(URLRequestTest, BZip2ContentTest_IncrementalHeader) {
const std::string& got_bz2_content = d2.data_received();
// compare those two results
- EXPECT_TRUE(got_content == got_bz2_content);
+ EXPECT_EQ(got_content, got_bz2_content);
}
TEST(URLRequestTest, ResolveShortcutTest) {