New issue
Advanced search Search tips

Issue 787574 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Nov 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Refactor SSLSocketDataProvider to provide an SSLInfo

Project Member Reported by rsleevi@chromium.org, Nov 21 2017

Issue description

Presently, SSLSocketDataProvider has a number of discrete members that it uses to populate the SSLInfo for GetSSLInfo(). Additional fields are added as needed incrementally.

However, rather than setting these fields piecemeal, callers should just be able to specify the SSLInfo that the MockSSLClientSocket should return, which allows for less boilerplate-churn through the layers.
 
Owner: rsleevi@chromium.org
Status: Assigned (was: Available)
Turns out this is a blocker for some of my testing - or at least, it's enough that I don't want to make the problem worse - so I'll just go ahead and fix it.
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4f83209aba1659d95ffe3140880f4ef7656f562d

commit 4f83209aba1659d95ffe3140880f4ef7656f562d
Author: Ryan Sleevi <rsleevi@chromium.org>
Date: Tue Nov 21 23:25:49 2017

Refactor SSLSocketDataProvider to provide an SSLInfo

SSLSocketDataProvider is used to vend MockSSLClientSockets
for unittests. It was originally just used to simulate the
behaviour of Connect() with a given cert, but has since
grown to include a number of additional fields that are then
exposed via the StreamSocket::GetSSLInfo() interface.

Rather than maintaining discrete fields on the
SSLSocketDataProvider and adding more fields as they grow,
just store an SSLInfo in the data provider so that any of
the fields can be simulated.

BUG= 787574 

Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I03f5dd6241e38221067220e9547b1ea5052a539a
Reviewed-on: https://chromium-review.googlesource.com/783256
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Commit-Queue: Ryan Sleevi <rsleevi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518439}
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/http/bidirectional_stream_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/http/http_network_transaction_ssl_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/http/http_network_transaction_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/quic/chromium/quic_network_transaction_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/socket/socket_test_util.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/socket/socket_test_util.h
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/socket/ssl_client_socket_pool_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/spdy/chromium/bidirectional_stream_spdy_impl_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/spdy/chromium/http2_push_promise_index_test.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/spdy/chromium/spdy_http_stream_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/spdy/chromium/spdy_network_transaction_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/spdy/chromium/spdy_proxy_client_socket_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/spdy/chromium/spdy_session_fuzzer.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/spdy/chromium/spdy_session_pool_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/spdy/chromium/spdy_session_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/spdy/chromium/spdy_stream_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/url_request/url_request_http_job_unittest.cc
[modify] https://crrev.com/4f83209aba1659d95ffe3140880f4ef7656f562d/net/websockets/websocket_stream_test.cc

Labels: M-64
Status: Verified (was: Assigned)

Sign in to add a comment