diff options
Diffstat (limited to 'chromium/net/quic/bidirectional_stream_quic_impl_unittest.cc')
-rw-r--r-- | chromium/net/quic/bidirectional_stream_quic_impl_unittest.cc | 53 |
1 files changed, 19 insertions, 34 deletions
diff --git a/chromium/net/quic/bidirectional_stream_quic_impl_unittest.cc b/chromium/net/quic/bidirectional_stream_quic_impl_unittest.cc index eabc5fb796b..42a842808f5 100644 --- a/chromium/net/quic/bidirectional_stream_quic_impl_unittest.cc +++ b/chromium/net/quic/bidirectional_stream_quic_impl_unittest.cc @@ -123,21 +123,7 @@ class TestDelegateBase : public BidirectionalStreamImpl::Delegate { std::unique_ptr<base::OneShotTimer> timer) : read_buf_(read_buf), read_buf_len_(read_buf_len), - timer_(std::move(timer)), - loop_(nullptr), - next_proto_(kProtoUnknown), - received_bytes_(0), - sent_bytes_(0), - has_load_timing_info_(false), - error_(OK), - on_data_read_count_(0), - on_data_sent_count_(0), - not_expect_callback_(false), - on_failed_called_(false), - send_request_headers_automatically_(true), - is_ready_(false), - trailers_expected_(false), - trailers_received_(false) { + timer_(std::move(timer)) { loop_ = std::make_unique<base::RunLoop>(); } @@ -338,23 +324,23 @@ class TestDelegateBase : public BidirectionalStreamImpl::Delegate { std::unique_ptr<base::RunLoop> loop_; spdy::Http2HeaderBlock response_headers_; spdy::Http2HeaderBlock trailers_; - NextProto next_proto_; - int64_t received_bytes_; - int64_t sent_bytes_; - bool has_load_timing_info_; + NextProto next_proto_ = kProtoUnknown; + int64_t received_bytes_ = 0; + int64_t sent_bytes_ = 0; + bool has_load_timing_info_ = false; LoadTimingInfo load_timing_info_; - int error_; - int on_data_read_count_; - int on_data_sent_count_; + int error_ = OK; + int on_data_read_count_ = 0; + int on_data_sent_count_ = 0; // This is to ensure that delegate callback is not invoked synchronously when // calling into |stream_|. - bool not_expect_callback_; - bool on_failed_called_; + bool not_expect_callback_ = false; + bool on_failed_called_ = false; CompletionOnceCallback callback_; - bool send_request_headers_automatically_; - bool is_ready_; - bool trailers_expected_; - bool trailers_received_; + bool send_request_headers_automatically_ = true; + bool is_ready_ = false; + bool trailers_expected_ = false; + bool trailers_received_ = false; }; // A delegate that deletes the stream in a particular callback. @@ -460,14 +446,12 @@ class BidirectionalStreamQuicImplTest kDefaultServerHostName, quic::Perspective::IS_CLIENT, client_headers_include_h2_stream_dependency_), - packet_number_(0), server_maker_(version_, connection_id_, &clock_, kDefaultServerHostName, quic::Perspective::IS_SERVER, false), - random_generator_(0), printer_(version_), destination_(url::kHttpsScheme, kDefaultServerHostName, @@ -561,7 +545,8 @@ class BidirectionalStreamQuicImplTest base::WrapUnique(static_cast<QuicServerInfo*>(nullptr)), QuicSessionKey(kDefaultServerHostName, kDefaultServerPort, PRIVACY_MODE_DISABLED, SocketTag(), - NetworkIsolationKey(), SecureDnsPolicy::kAllow), + NetworkIsolationKey(), SecureDnsPolicy::kAllow, + /*require_dns_https_alpn=*/false), /*require_confirmation=*/false, /*migrate_session_early_v2=*/false, /*migrate_session_on_network_change_v2=*/false, @@ -829,7 +814,7 @@ class BidirectionalStreamQuicImplTest } protected: - QuicFlagSaver saver_; + quic::test::QuicFlagSaver saver_; const quic::ParsedQuicVersion version_; const bool client_headers_include_h2_stream_dependency_; RecordingNetLogObserver net_log_observer_; @@ -851,11 +836,11 @@ class BidirectionalStreamQuicImplTest const quic::QuicConnectionId connection_id_; const quic::QuicStreamId stream_id_; QuicTestPacketMaker client_maker_; - uint64_t packet_number_; + uint64_t packet_number_ = 0; QuicTestPacketMaker server_maker_; IPEndPoint self_addr_; IPEndPoint peer_addr_; - quic::test::MockRandom random_generator_; + quic::test::MockRandom random_generator_{0}; QuicPacketPrinter printer_; MockCryptoClientStreamFactory crypto_client_stream_factory_; std::unique_ptr<StaticSocketDataProvider> socket_data_; |