Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Issue 2109503009: Refactor net tests to use GMock matchers for checking net::Error results (Closed)

Created:
4 years, 5 months ago by Rob Percival
Modified:
4 years, 5 months ago
Reviewers:
eroman
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org, viettrungluu+watch_chromium.org, Paweł Hajdan Jr., yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, kinuko+cache_chromium.org, darin (slow to review), ben+mojo_chromium.org, qsr+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor net tests to use GMock matchers for checking net::Error results Uses matchers introduced in https://chromiumcodereview-hr.appspot.com/2111093002/. ASSERT_EQ(net::ERR_*, ...) -> ASSERT_THAT(..., IsError(net::ERR_*)) ASSERT_EQ(net::OK, ...) -> ASSERT_THAT(..., IsOk()) EXPECT_EQ(net::ERR_*, ...) -> EXPECT_THAT(..., IsError(net::ERR_*)) EXPECT_EQ(net::OK, ...) -> EXPECT_THAT(..., IsOk()) Also done for cases where the "net::" prefix is omitted. Committed: https://crrev.com/214763f5198b2a99f6f4e2104b67aa5359837b86 Cr-Commit-Position: refs/heads/master@{#403561}

Patch Set 1 #

Patch Set 2 : Revert changes to contents.txt files #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4177 lines, -3510 lines) Patch
M net/base/chunked_upload_data_stream_unittest.cc View 1 18 chunks +23 lines, -18 lines 0 comments Download
M net/base/directory_lister_unittest.cc View 1 6 chunks +10 lines, -5 lines 0 comments Download
M net/base/elements_upload_data_stream_unittest.cc View 1 24 chunks +47 lines, -43 lines 0 comments Download
M net/base/file_stream_unittest.cc View 1 22 chunks +52 lines, -42 lines 0 comments Download
M net/base/static_cookie_policy_unittest.cc View 1 2 chunks +34 lines, -30 lines 0 comments Download
M net/base/upload_bytes_element_reader_unittest.cc View 1 3 chunks +6 lines, -2 lines 0 comments Download
M net/base/upload_file_element_reader_unittest.cc View 1 8 chunks +22 lines, -15 lines 0 comments Download
M net/cert/caching_cert_verifier_unittest.cc View 1 3 chunks +6 lines, -2 lines 0 comments Download
M net/cert/cert_verify_proc_unittest.cc View 1 34 chunks +45 lines, -40 lines 0 comments Download
M net/cert/internal/name_constraints_unittest.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M net/cert/multi_threaded_cert_verifier_unittest.cc View 1 7 chunks +15 lines, -10 lines 0 comments Download
M net/cert/nss_cert_database_unittest.cc View 1 20 chunks +33 lines, -24 lines 0 comments Download
M net/cert/test_root_certs_unittest.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M net/cert_net/cert_net_fetcher_impl_unittest.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M net/cert_net/nss_ocsp_unittest.cc View 1 2 chunks +7 lines, -2 lines 0 comments Download
M net/disk_cache/backend_unittest.cc View 1 110 chunks +190 lines, -185 lines 0 comments Download
M net/disk_cache/disk_cache_test_base.cc View 1 6 chunks +11 lines, -6 lines 0 comments Download
M net/disk_cache/entry_unittest.cc View 1 135 chunks +181 lines, -172 lines 0 comments Download
M net/disk_cache/simple/simple_index_file_unittest.cc View 1 2 chunks +6 lines, -2 lines 0 comments Download
M net/dns/dns_transaction_unittest.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M net/dns/host_resolver_impl_unittest.cc View 1 70 chunks +253 lines, -217 lines 0 comments Download
M net/dns/host_resolver_mojo_unittest.cc View 1 10 chunks +17 lines, -11 lines 0 comments Download
M net/dns/mapped_host_resolver_unittest.cc View 1 11 chunks +24 lines, -19 lines 0 comments Download
M net/dns/mojo_host_resolver_impl_unittest.cc View 1 6 chunks +12 lines, -7 lines 0 comments Download
M net/dns/single_request_host_resolver_unittest.cc View 1 3 chunks +8 lines, -3 lines 0 comments Download
M net/ftp/ftp_ctrl_response_buffer_unittest.cc View 1 9 chunks +32 lines, -26 lines 0 comments Download
M net/ftp/ftp_network_transaction_unittest.cc View 1 7 chunks +11 lines, -6 lines 0 comments Download
M net/http/bidirectional_stream_unittest.cc View 1 14 chunks +18 lines, -13 lines 0 comments Download
M net/http/disk_cache_based_quic_server_info_unittest.cc View 1 21 chunks +27 lines, -22 lines 0 comments Download
M net/http/http_auth_handler_basic_unittest.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M net/http/http_auth_handler_digest_unittest.cc View 1 4 chunks +7 lines, -3 lines 0 comments Download
M net/http/http_auth_handler_factory_unittest.cc View 1 7 chunks +11 lines, -6 lines 0 comments Download
M net/http/http_auth_handler_negotiate_unittest.cc View 1 6 chunks +9 lines, -4 lines 0 comments Download
M net/http/http_auth_sspi_win_unittest.cc View 1 3 chunks +7 lines, -2 lines 0 comments Download
M net/http/http_cache_unittest.cc View 1 74 chunks +112 lines, -107 lines 0 comments Download
M net/http/http_chunked_decoder_unittest.cc View 1 2 chunks +6 lines, -1 line 0 comments Download
M net/http/http_network_layer_unittest.cc View 1 6 chunks +19 lines, -14 lines 0 comments Download
M net/http/http_network_transaction_ssl_unittest.cc View 1 4 chunks +7 lines, -3 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 356 chunks +577 lines, -572 lines 0 comments Download
M net/http/http_proxy_client_socket_pool_unittest.cc View 1 14 chunks +31 lines, -23 lines 0 comments Download
M net/http/http_stream_factory_impl_unittest.cc View 1 5 chunks +10 lines, -4 lines 0 comments Download
M net/http/http_stream_parser_unittest.cc View 1 29 chunks +56 lines, -42 lines 0 comments Download
M net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc View 1 8 chunks +12 lines, -7 lines 0 comments Download
M net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc View 1 8 chunks +12 lines, -7 lines 0 comments Download
M net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc View 1 3 chunks +7 lines, -2 lines 0 comments Download
M net/proxy/mojo_proxy_resolver_impl_unittest.cc View 1 5 chunks +9 lines, -4 lines 0 comments Download
M net/proxy/multi_threaded_proxy_resolver_unittest.cc View 1 19 chunks +32 lines, -27 lines 0 comments Download
M net/proxy/proxy_list_unittest.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M net/proxy/proxy_resolver_factory_mojo_unittest.cc View 1 9 chunks +22 lines, -17 lines 0 comments Download
M net/proxy/proxy_resolver_perftest.cc View 1 6 chunks +8 lines, -4 lines 0 comments Download
M net/proxy/proxy_resolver_v8_tracing_unittest.cc View 1 19 chunks +23 lines, -18 lines 0 comments Download
M net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc View 1 28 chunks +50 lines, -45 lines 0 comments Download
M net/proxy/proxy_resolver_v8_unittest.cc View 1 23 chunks +48 lines, -40 lines 0 comments Download
M net/proxy/proxy_script_decider_unittest.cc View 1 9 chunks +13 lines, -8 lines 0 comments Download
M net/proxy/proxy_script_fetcher_impl_unittest.cc View 1 20 chunks +38 lines, -33 lines 0 comments Download
M net/proxy/proxy_service_mojo_unittest.cc View 1 5 chunks +7 lines, -4 lines 0 comments Download
M net/proxy/proxy_service_unittest.cc View 1 145 chunks +158 lines, -153 lines 0 comments Download
M net/quic/bidirectional_stream_quic_impl_unittest.cc View 1 24 chunks +34 lines, -28 lines 0 comments Download
M net/quic/crypto/properties_based_quic_server_info_test.cc View 1 3 chunks +6 lines, -2 lines 0 comments Download
M net/quic/p2p/quic_p2p_session_test.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M net/quic/quic_chromium_client_session_test.cc View 1 7 chunks +8 lines, -6 lines 0 comments Download
M net/quic/quic_chromium_client_stream_test.cc View 1 4 chunks +7 lines, -3 lines 0 comments Download
M net/quic/quic_end_to_end_unittest.cc View 1 4 chunks +6 lines, -2 lines 0 comments Download
M net/quic/quic_http_stream_test.cc View 1 27 chunks +53 lines, -33 lines 0 comments Download
M net/quic/quic_network_transaction_unittest.cc View 1 13 chunks +28 lines, -23 lines 0 comments Download
M net/quic/quic_stream_factory_test.cc View 1 51 chunks +57 lines, -52 lines 0 comments Download
M net/server/http_server_unittest.cc View 1 12 chunks +15 lines, -11 lines 0 comments Download
M net/socket/client_socket_pool_base_unittest.cc View 1 98 chunks +212 lines, -207 lines 0 comments Download
M net/socket/sequenced_socket_data_unittest.cc View 1 2 chunks +7 lines, -1 line 0 comments Download
M net/socket/socks5_client_socket_unittest.cc View 1 13 chunks +23 lines, -18 lines 0 comments Download
M net/socket/socks_client_socket_pool_unittest.cc View 1 9 chunks +18 lines, -13 lines 0 comments Download
M net/socket/socks_client_socket_unittest.cc View 1 11 chunks +21 lines, -16 lines 0 comments Download
M net/socket/ssl_client_socket_pool_unittest.cc View 1 21 chunks +42 lines, -35 lines 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 1 98 chunks +119 lines, -113 lines 0 comments Download
M net/socket/ssl_server_socket_unittest.cc View 1 17 chunks +34 lines, -29 lines 0 comments Download
M net/socket/tcp_client_socket_unittest.cc View 1 5 chunks +17 lines, -11 lines 0 comments Download
M net/socket/tcp_server_socket_unittest.cc View 1 11 chunks +19 lines, -15 lines 0 comments Download
M net/socket/tcp_socket_unittest.cc View 1 13 chunks +29 lines, -25 lines 0 comments Download
M net/socket/transport_client_socket_pool_unittest.cc View 1 35 chunks +115 lines, -104 lines 0 comments Download
M net/socket/transport_client_socket_unittest.cc View 1 7 chunks +12 lines, -7 lines 0 comments Download
M net/socket/unix_domain_client_socket_posix_unittest.cc View 1 12 chunks +34 lines, -25 lines 0 comments Download
M net/socket/unix_domain_server_socket_posix_unittest.cc View 1 6 chunks +12 lines, -6 lines 0 comments Download
M net/socket/websocket_endpoint_lock_manager_unittest.cc View 1 13 chunks +18 lines, -12 lines 0 comments Download
M net/socket/websocket_transport_client_socket_pool_unittest.cc View 1 39 chunks +112 lines, -107 lines 0 comments Download
M net/spdy/bidirectional_stream_spdy_impl_unittest.cc View 1 2 chunks +6 lines, -1 line 0 comments Download
M net/spdy/spdy_http_stream_unittest.cc View 1 22 chunks +30 lines, -23 lines 0 comments Download
M net/spdy/spdy_network_transaction_unittest.cc View 1 127 chunks +170 lines, -166 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket_unittest.cc View 1 4 chunks +15 lines, -8 lines 0 comments Download
M net/spdy/spdy_session_pool_unittest.cc View 1 3 chunks +9 lines, -4 lines 0 comments Download
M net/spdy/spdy_session_unittest.cc View 1 28 chunks +38 lines, -34 lines 0 comments Download
M net/spdy/spdy_stream_unittest.cc View 1 15 chunks +24 lines, -19 lines 0 comments Download
M net/spdy/spdy_test_util_common.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M net/ssl/channel_id_service_unittest.cc View 1 22 chunks +46 lines, -41 lines 0 comments Download
M net/ssl/default_channel_id_store_unittest.cc View 1 3 chunks +8 lines, -3 lines 0 comments Download
M net/test/embedded_test_server/embedded_test_server_unittest.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M net/udp/udp_socket_perftest.cc View 1 3 chunks +6 lines, -2 lines 0 comments Download
M net/udp/udp_socket_unittest.cc View 1 23 chunks +46 lines, -41 lines 0 comments Download
M net/url_request/url_fetcher_impl_unittest.cc View 1 11 chunks +24 lines, -11 lines 0 comments Download
M net/url_request/url_fetcher_response_writer_unittest.cc View 1 7 chunks +17 lines, -13 lines 0 comments Download
M net/url_request/url_request_file_dir_job_unittest.cc View 1 2 chunks +6 lines, -1 line 0 comments Download
M net/url_request/url_request_ftp_job_unittest.cc View 1 2 chunks +6 lines, -1 line 0 comments Download
M net/url_request/url_request_http_job_unittest.cc View 1 4 chunks +6 lines, -2 lines 0 comments Download
M net/url_request/url_request_job_factory_impl_unittest.cc View 1 3 chunks +7 lines, -2 lines 0 comments Download
M net/url_request/url_request_job_unittest.cc View 1 2 chunks +6 lines, -1 line 0 comments Download
M net/url_request/url_request_simple_job_unittest.cc View 1 2 chunks +7 lines, -1 line 0 comments Download
M net/url_request/url_request_unittest.cc View 1 34 chunks +40 lines, -33 lines 0 comments Download
M net/url_request/view_cache_helper_unittest.cc View 1 9 chunks +13 lines, -9 lines 0 comments Download
M net/websockets/websocket_basic_stream_test.cc View 1 39 chunks +103 lines, -73 lines 0 comments Download
M net/websockets/websocket_deflate_stream_test.cc View 1 34 chunks +44 lines, -32 lines 0 comments Download
M net/websockets/websocket_errors_test.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M net/websockets/websocket_handshake_stream_create_helper_test.cc View 1 3 chunks +7 lines, -3 lines 0 comments Download
M net/websockets/websocket_stream_test.cc View 1 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 14 (5 generated)
Rob Percival
PTAL
4 years, 5 months ago (2016-07-01 09:13:53 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2109503009/10001
4 years, 5 months ago (2016-07-01 09:14:26 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-07-01 10:49:53 UTC) #6
eroman
rubberstamp LGTM (I verified a subset of the files but not all).
4 years, 5 months ago (2016-07-01 19:00:55 UTC) #7
Rob Percival
On 2016/07/01 19:00:55, eroman wrote: > rubberstamp LGTM > (I verified a subset of the ...
4 years, 5 months ago (2016-07-01 23:15:24 UTC) #8
eroman
Correct On Fri, Jul 1, 2016 at 4:15 PM, <robpercival@chromium.org> wrote: > On 2016/07/01 19:00:55, ...
4 years, 5 months ago (2016-07-01 23:16:04 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2109503009/10001
4 years, 5 months ago (2016-07-01 23:18:53 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:10001)
4 years, 5 months ago (2016-07-01 23:27:22 UTC) #12
commit-bot: I haz the power
4 years, 5 months ago (2016-07-01 23:29:24 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/214763f5198b2a99f6f4e2104b67aa5359837b86
Cr-Commit-Position: refs/heads/master@{#403561}

Powered by Google App Engine
This is Rietveld 408576698