diff options
author | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-10 22:53:29 +0000 |
---|---|---|
committer | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-10 22:53:29 +0000 |
commit | 06a11cab7c6c726ac97606dc70d6012e4455ecfd (patch) | |
tree | 5b7d32e238fc57f8e07f717d1e96c23100fae532 /net | |
parent | 07d212e60e60aa937f81cf0be686a4fb7997bfd4 (diff) | |
download | chromium_src-06a11cab7c6c726ac97606dc70d6012e4455ecfd.zip chromium_src-06a11cab7c6c726ac97606dc70d6012e4455ecfd.tar.gz chromium_src-06a11cab7c6c726ac97606dc70d6012e4455ecfd.tar.bz2 |
Rename tcp_client_socket.cc to _win.cc (should have been done long ago).
Move some truly win32-specific from the 'portable' to the 'platform-specific' category.
Enable some tests that already work.
Fix a couple signedness mismatch errors that showed up while testing the above.
Review URL: http://codereview.chromium.org/9465
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5134 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/filter_unittest.cc | 12 | ||||
-rw-r--r-- | net/base/tcp_client_socket_win.cc (renamed from net/base/tcp_client_socket.cc) | 0 | ||||
-rw-r--r-- | net/build/net.vcproj | 4 | ||||
-rw-r--r-- | net/net_lib.scons | 12 | ||||
-rw-r--r-- | net/net_unittests.scons | 13 |
5 files changed, 16 insertions, 25 deletions
diff --git a/net/base/filter_unittest.cc b/net/base/filter_unittest.cc index ce04574..950132e 100644 --- a/net/base/filter_unittest.cc +++ b/net/base/filter_unittest.cc @@ -69,14 +69,14 @@ TEST(FilterTest, ApacheGzip) { encoding_types.clear(); encoding_types.push_back(Filter::FILTER_TYPE_SDCH); Filter::FixupEncodingTypes(is_sdch_response, kGzipMime1, &encoding_types); - EXPECT_EQ(1, encoding_types.size()); + EXPECT_EQ(1U, encoding_types.size()); EXPECT_EQ(Filter::FILTER_TYPE_SDCH, encoding_types.front()); // Check to be sure that gzip can survive with other mime types. encoding_types.clear(); encoding_types.push_back(Filter::FILTER_TYPE_GZIP); Filter::FixupEncodingTypes(is_sdch_response, "other/mime", &encoding_types); - EXPECT_EQ(1, encoding_types.size()); + EXPECT_EQ(1U, encoding_types.size()); EXPECT_EQ(Filter::FILTER_TYPE_GZIP, encoding_types.front()); } @@ -91,7 +91,7 @@ TEST(FilterTest, SdchEncoding) { encoding_types.push_back(Filter::FILTER_TYPE_SDCH); encoding_types.push_back(Filter::FILTER_TYPE_GZIP); Filter::FixupEncodingTypes(is_sdch_response, kTextHtmlMime, &encoding_types); - EXPECT_EQ(2, encoding_types.size()); + EXPECT_EQ(2U, encoding_types.size()); EXPECT_EQ(Filter::FILTER_TYPE_SDCH, encoding_types[0]); EXPECT_EQ(Filter::FILTER_TYPE_GZIP, encoding_types[1]); @@ -100,7 +100,7 @@ TEST(FilterTest, SdchEncoding) { encoding_types.push_back(Filter::FILTER_TYPE_SDCH); encoding_types.push_back(Filter::FILTER_TYPE_GZIP); Filter::FixupEncodingTypes(is_sdch_response, "other/type", &encoding_types); - EXPECT_EQ(2, encoding_types.size()); + EXPECT_EQ(2U, encoding_types.size()); EXPECT_EQ(Filter::FILTER_TYPE_SDCH, encoding_types[0]); EXPECT_EQ(Filter::FILTER_TYPE_GZIP, encoding_types[1]); @@ -108,7 +108,7 @@ TEST(FilterTest, SdchEncoding) { encoding_types.clear(); encoding_types.push_back(Filter::FILTER_TYPE_SDCH); Filter::FixupEncodingTypes(is_sdch_response, "other/type", &encoding_types); - EXPECT_EQ(2, encoding_types.size()); + EXPECT_EQ(2U, encoding_types.size()); EXPECT_EQ(Filter::FILTER_TYPE_SDCH, encoding_types[0]); EXPECT_EQ(Filter::FILTER_TYPE_GZIP_HELPING_SDCH, encoding_types[1]); } @@ -122,7 +122,7 @@ TEST(FilterTest, MissingSdchEncoding) { // Loss of encoding, but it was an SDCH response with html type. encoding_types.clear(); Filter::FixupEncodingTypes(is_sdch_response, kTextHtmlMime, &encoding_types); - EXPECT_EQ(2, encoding_types.size()); + EXPECT_EQ(2U, encoding_types.size()); EXPECT_EQ(Filter::FILTER_TYPE_SDCH, encoding_types[0]); EXPECT_EQ(Filter::FILTER_TYPE_GZIP_HELPING_SDCH, encoding_types[1]); diff --git a/net/base/tcp_client_socket.cc b/net/base/tcp_client_socket_win.cc index bb25e34..bb25e34 100644 --- a/net/base/tcp_client_socket.cc +++ b/net/base/tcp_client_socket_win.cc diff --git a/net/build/net.vcproj b/net/build/net.vcproj index 85b387d..2f0c535 100644 --- a/net/build/net.vcproj +++ b/net/build/net.vcproj @@ -461,11 +461,11 @@ > </File> <File - RelativePath="..\base\tcp_client_socket.cc" + RelativePath="..\base\tcp_client_socket.h" > </File> <File - RelativePath="..\base\tcp_client_socket.h" + RelativePath="..\base\tcp_client_socket_win.cc" > </File> <File diff --git a/net/net_lib.scons b/net/net_lib.scons index 82c1af2..5361f5b 100644 --- a/net/net_lib.scons +++ b/net/net_lib.scons @@ -55,12 +55,9 @@ input_files = [ 'base/sdch_filter.cc', 'base/sdch_manager.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', @@ -100,7 +97,6 @@ input_files = [ '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', @@ -117,15 +113,11 @@ if env['PLATFORM'] in ('posix', 'darwin'): 'base/directory_lister.cc', 'base/listen_socket.cc', 'base/ssl_config_service.cc', - 'base/tcp_client_socket.cc', 'base/telnet_server.cc', - 'base/wininet_util.cc', - 'base/winsock_init.cc', 'http/http_transaction_winhttp.cc', 'http/winhttp_request_throttle.cc', 'url_request/url_request_file_dir_job.cc', 'url_request/url_request_ftp_job.cc', - 'url_request/url_request_inet_job.cc', ] for remove in to_be_ported_files: input_files.remove(remove) @@ -136,11 +128,15 @@ if env['PLATFORM'] == 'win32': 'base/net_util_win.cc', 'base/platform_mime_util_win.cc', 'base/ssl_client_socket_win.cc', + 'base/tcp_client_socket_win.cc', + 'base/wininet_util.cc', + 'base/winsock_init.cc', 'base/x509_certificate_win.cc', 'disk_cache/cache_util_win.cc', 'disk_cache/file_win.cc', 'disk_cache/mapped_file_win.cc', 'proxy/proxy_resolver_winhttp.cc', + 'url_request/url_request_inet_job.cc', ]) if env['PLATFORM'] == 'darwin': diff --git a/net/net_unittests.scons b/net/net_unittests.scons index 6079392..c683936 100644 --- a/net/net_unittests.scons +++ b/net/net_unittests.scons @@ -71,6 +71,7 @@ input_files = [ 'base/data_url_unittest.cc', 'base/escape_unittest.cc', 'base/file_stream_unittest.cc', + 'base/filter_unittest.cc', 'base/gzip_filter_unittest.cc', 'base/host_resolver_unittest.cc', 'base/mime_sniffer_unittest.cc', @@ -78,6 +79,7 @@ input_files = [ 'base/net_util_unittest.cc', 'base/registry_controlled_domain_unittest.cc', 'base/run_all_unittests.cc', + 'base/ssl_client_socket_unittest.cc', 'base/tcp_client_socket_unittest.cc', 'base/test_completion_callback_unittest.cc', 'disk_cache/addr_unittest.cc', @@ -92,8 +94,10 @@ input_files = [ 'http/http_auth_unittest.cc', 'http/http_auth_handler_basic_unittest.cc', 'http/http_auth_handler_digest_unittest.cc', + 'http/http_cache_unittest.cc', 'http/http_chunked_decoder_unittest.cc', 'http/http_network_transaction_unittest.cc', + 'http/http_network_layer_unittest.cc', 'http/http_response_headers_unittest.cc', 'http/http_transaction_unittest.cc', 'http/http_util_unittest.cc', @@ -104,12 +108,8 @@ if env['PLATFORM'] == 'win32': input_files.extend([ 'base/directory_lister_unittest.cc', 'base/sdch_filter_unittest.cc', - 'base/filter_unittest.cc', 'base/ssl_config_service_unittest.cc', - 'base/ssl_client_socket_unittest.cc', 'base/wininet_util_unittest.cc', - 'http/http_cache_unittest.cc', - 'http/http_network_layer_unittest.cc', 'http/http_transaction_winhttp_unittest.cc', 'http/winhttp_request_throttle_unittest.cc', 'url_request/url_request_unittest.cc', @@ -125,9 +125,4 @@ if env['PLATFORM'] == 'posix': 'url_request/url_request_unittest.cc', ]) -if env['PLATFORM'] in ('darwin', 'posix'): - input_files.extend([ - 'base/ssl_client_socket_unittest.cc', - ]) - env.ChromeTestProgram('net_unittests', input_files) |