#include "net/quic/quic_chromium_client_stream.h"
#include <string>
#include <string_view>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "net/quic/quic_chromium_client_session.h"
#include "net/quic/quic_context.h"
#include "net/test/gtest_util.h"
#include "net/test/test_with_task_environment.h"
#include "net/third_party/quiche/src/quiche/common/http/http_header_block.h"
#include "net/third_party/quiche/src/quiche/quic/core/http/quic_spdy_client_session_base.h"
#include "net/third_party/quiche/src/quiche/quic/core/http/quic_spdy_client_stream.h"
#include "net/third_party/quiche/src/quiche/quic/core/http/spdy_utils.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_server_id.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_utils.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/crypto_test_utils.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_config_peer.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_connection_peer.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_spdy_session_peer.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_test_utils.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "testing/gmock/include/gmock/gmock.h"
_;
Return;
namespace net::test {
namespace {
class EstablishedCryptoStream : public quic::test::MockQuicCryptoStream { … };
class MockQuicClientSessionBase : public quic::QuicSpdyClientSessionBase { … };
MockQuicClientSessionBase::MockQuicClientSessionBase(
quic::QuicConnection* connection)
: … { … }
MockQuicClientSessionBase::~MockQuicClientSessionBase() = default;
class QuicChromiumClientStreamTest
: public ::testing::TestWithParam<quic::ParsedQuicVersion>,
public WithTaskEnvironment { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(QuicChromiumClientStreamTest, Handle) { … }
TEST_P(QuicChromiumClientStreamTest, HandleAfterConnectionClose) { … }
TEST_P(QuicChromiumClientStreamTest, HandleAfterStreamReset) { … }
TEST_P(QuicChromiumClientStreamTest, OnFinRead) { … }
TEST_P(QuicChromiumClientStreamTest, OnDataAvailable) { … }
TEST_P(QuicChromiumClientStreamTest, OnDataAvailableAfterReadBody) { … }
TEST_P(QuicChromiumClientStreamTest, ProcessHeadersWithError) { … }
TEST_P(QuicChromiumClientStreamTest, OnDataAvailableWithError) { … }
TEST_P(QuicChromiumClientStreamTest, OnError) { … }
TEST_P(QuicChromiumClientStreamTest, OnTrailers) { … }
TEST_P(QuicChromiumClientStreamTest, MarkTrailersConsumedWhenNotifyDelegate) { … }
TEST_P(QuicChromiumClientStreamTest, ReadAfterTrailersReceivedButNotDelivered) { … }
TEST_P(QuicChromiumClientStreamTest, WriteStreamData) { … }
TEST_P(QuicChromiumClientStreamTest, WriteStreamDataAsync) { … }
TEST_P(QuicChromiumClientStreamTest, WritevStreamData) { … }
TEST_P(QuicChromiumClientStreamTest, WritevStreamDataAsync) { … }
TEST_P(QuicChromiumClientStreamTest, WriteConnectUdpPayload) { … }
TEST_P(QuicChromiumClientStreamTest, HeadersBeforeHandle) { … }
TEST_P(QuicChromiumClientStreamTest, HeadersAndDataBeforeHandle) { … }
TEST_P(QuicChromiumClientStreamTest, ResetOnEmptyResponseHeaders) { … }
TEST_P(QuicChromiumClientStreamTest, InvalidStatus) { … }
TEST_P(QuicChromiumClientStreamTest, SwitchingProtocolsResponse) { … }
TEST_P(QuicChromiumClientStreamTest, ContinueResponse) { … }
TEST_P(QuicChromiumClientStreamTest, EarlyHintsResponses) { … }
TEST_P(QuicChromiumClientStreamTest, EarlyHintsAsync) { … }
TEST_P(QuicChromiumClientStreamTest, EarlyHintsAfterInitialHeaders) { … }
TEST_P(QuicChromiumClientStreamTest, EarlyHintsAfterInitialHeadersWithoutRead) { … }
TEST_P(QuicChromiumClientStreamTest, TrailersAfterEarlyHintsWithoutRead) { … }
}
}