gfe-relnote: n/a, test-only change. In quic/core/http/end_to_end_test.cc, rename EndToEndTest to EndToEndTestWithoutTls and rename EndToEndTestWithTls to EndToEndTest to make it clear that testing with TLS is the default. PiperOrigin-RevId: 308165111 Change-Id: Ib4fdd5dca7bda4d09bedfe9986b577b0e294187c
diff --git a/quic/core/http/end_to_end_test.cc b/quic/core/http/end_to_end_test.cc index 4d02c80..5513a7f 100644 --- a/quic/core/http/end_to_end_test.cc +++ b/quic/core/http/end_to_end_test.cc
@@ -603,17 +603,19 @@ // Run all end to end tests with all supported versions. INSTANTIATE_TEST_SUITE_P(EndToEndTests, EndToEndTest, - ::testing::ValuesIn(GetTestParams(false)), - ::testing::PrintToStringParamName()); - -class EndToEndTestWithTls : public EndToEndTest {}; - -INSTANTIATE_TEST_SUITE_P(EndToEndTestsWithTls, - EndToEndTestWithTls, ::testing::ValuesIn(GetTestParams(true)), ::testing::PrintToStringParamName()); -TEST_P(EndToEndTestWithTls, HandshakeSuccessful) { +// These tests are only run with QUIC versions that do not use TLS. +// TODO(b/154151800): Run all tests with TLS as well as QUIC crypto. +class EndToEndTestWithoutTls : public EndToEndTest {}; + +INSTANTIATE_TEST_SUITE_P(EndToEndTestsWithoutTls, + EndToEndTestWithoutTls, + ::testing::ValuesIn(GetTestParams(false)), + ::testing::PrintToStringParamName()); + +TEST_P(EndToEndTest, HandshakeSuccessful) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); server_thread_->WaitForCryptoHandshakeConfirmed(); @@ -634,7 +636,7 @@ EXPECT_FALSE(QuicStreamSequencerPeer::IsUnderlyingBufferAllocated(sequencer)); } -TEST_P(EndToEndTest, SimpleRequestResponse) { +TEST_P(EndToEndTestWithoutTls, SimpleRequestResponse) { ASSERT_TRUE(Initialize()); EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); @@ -651,13 +653,13 @@ } } -TEST_P(EndToEndTestWithTls, SimpleRequestResponse) { +TEST_P(EndToEndTest, SimpleRequestResponse) { ASSERT_TRUE(Initialize()); EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTestWithTls, HandshakeConfirmed) { +TEST_P(EndToEndTest, HandshakeConfirmed) { ASSERT_TRUE(Initialize()); if (!GetParam().negotiated_version.HasHandshakeDone()) { return; @@ -672,7 +674,7 @@ client_->Disconnect(); } -TEST_P(EndToEndTestWithTls, SendAndReceiveCoalescedPackets) { +TEST_P(EndToEndTest, SendAndReceiveCoalescedPackets) { ASSERT_TRUE(Initialize()); if (!GetClientConnection()->version().CanSendCoalescedPackets()) { return; @@ -689,7 +691,7 @@ // Simple transaction, but set a non-default ack delay at the client // and ensure it gets to the server. -TEST_P(EndToEndTest, SimpleRequestResponseWithAckDelayChange) { +TEST_P(EndToEndTestWithoutTls, SimpleRequestResponseWithAckDelayChange) { // Force the ACK delay to be something other than the default. // Note that it is sent only if doing IETF QUIC. client_config_.SetMaxAckDelayToSendMs(kDefaultDelayedAckTimeMs + 100u); @@ -714,7 +716,7 @@ // Simple transaction, but set a non-default ack exponent at the client // and ensure it gets to the server. -TEST_P(EndToEndTest, SimpleRequestResponseWithAckExponentChange) { +TEST_P(EndToEndTestWithoutTls, SimpleRequestResponseWithAckExponentChange) { const uint32_t kClientAckDelayExponent = kDefaultAckDelayExponent + 100u; // Force the ACK exponent to be something other than the default. // Note that it is sent only if doing IETF QUIC. @@ -741,7 +743,7 @@ GetServerConnection()->framer().local_ack_delay_exponent()); } -TEST_P(EndToEndTest, SimpleRequestResponseForcedVersionNegotiation) { +TEST_P(EndToEndTestWithoutTls, SimpleRequestResponseForcedVersionNegotiation) { client_supported_versions_.insert(client_supported_versions_.begin(), QuicVersionReservedForNegotiation()); testing::NiceMock<MockQuicConnectionDebugVisitor> visitor; @@ -757,7 +759,7 @@ EXPECT_FALSE(client_->client()->ReceivedInchoateReject()); } -TEST_P(EndToEndTestWithTls, ForcedVersionNegotiation) { +TEST_P(EndToEndTest, ForcedVersionNegotiation) { client_supported_versions_.insert(client_supported_versions_.begin(), QuicVersionReservedForNegotiation()); ASSERT_TRUE(Initialize()); @@ -767,7 +769,7 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTest, SimpleRequestResponseZeroConnectionID) { +TEST_P(EndToEndTestWithoutTls, SimpleRequestResponseZeroConnectionID) { if (!GetParam().negotiated_version.AllowsVariableLengthConnectionIds()) { ASSERT_TRUE(Initialize()); return; @@ -785,7 +787,7 @@ GetParam().negotiated_version.transport_version)); } -TEST_P(EndToEndTestWithTls, ZeroConnectionID) { +TEST_P(EndToEndTest, ZeroConnectionID) { if (!GetParam().negotiated_version.AllowsVariableLengthConnectionIds()) { ASSERT_TRUE(Initialize()); return; @@ -801,7 +803,7 @@ GetParam().negotiated_version.transport_version)); } -TEST_P(EndToEndTestWithTls, BadConnectionIdLength) { +TEST_P(EndToEndTest, BadConnectionIdLength) { if (!GetParam().negotiated_version.AllowsVariableLengthConnectionIds()) { ASSERT_TRUE(Initialize()); return; @@ -819,7 +821,7 @@ // Tests a very long (16-byte) initial destination connection ID to make // sure the dispatcher properly replaces it with an 8-byte one. -TEST_P(EndToEndTestWithTls, LongBadConnectionIdLength) { +TEST_P(EndToEndTest, LongBadConnectionIdLength) { if (!GetParam().negotiated_version.AllowsVariableLengthConnectionIds()) { ASSERT_TRUE(Initialize()); return; @@ -835,7 +837,7 @@ .length()); } -TEST_P(EndToEndTestWithTls, ClientConnectionId) { +TEST_P(EndToEndTest, ClientConnectionId) { if (!GetParam().negotiated_version.SupportsClientConnectionIds()) { ASSERT_TRUE(Initialize()); return; @@ -851,7 +853,7 @@ .length()); } -TEST_P(EndToEndTestWithTls, ForcedVersionNegotiationAndClientConnectionId) { +TEST_P(EndToEndTest, ForcedVersionNegotiationAndClientConnectionId) { if (!GetParam().negotiated_version.SupportsClientConnectionIds()) { ASSERT_TRUE(Initialize()); return; @@ -870,7 +872,7 @@ .length()); } -TEST_P(EndToEndTestWithTls, ForcedVersionNegotiationAndBadConnectionIdLength) { +TEST_P(EndToEndTest, ForcedVersionNegotiationAndBadConnectionIdLength) { if (!GetParam().negotiated_version.AllowsVariableLengthConnectionIds()) { ASSERT_TRUE(Initialize()); return; @@ -891,7 +893,7 @@ // Forced Version Negotiation with a client connection ID and a long // connection ID. -TEST_P(EndToEndTestWithTls, ForcedVersNegoAndClientCIDAndLongCID) { +TEST_P(EndToEndTest, ForcedVersNegoAndClientCIDAndLongCID) { if (!GetParam().negotiated_version.SupportsClientConnectionIds() || !GetParam().negotiated_version.AllowsVariableLengthConnectionIds()) { ASSERT_TRUE(Initialize()); @@ -917,7 +919,7 @@ .length()); } -TEST_P(EndToEndTest, MixGoodAndBadConnectionIdLengths) { +TEST_P(EndToEndTestWithoutTls, MixGoodAndBadConnectionIdLengths) { if (!GetParam().negotiated_version.AllowsVariableLengthConnectionIds()) { ASSERT_TRUE(Initialize()); return; @@ -957,7 +959,7 @@ .length()); } -TEST_P(EndToEndTestWithTls, SimpleRequestResponseWithIetfDraftSupport) { +TEST_P(EndToEndTest, SimpleRequestResponseWithIetfDraftSupport) { if (!GetParam().negotiated_version.HasIetfQuicFrames()) { ASSERT_TRUE(Initialize()); return; @@ -969,7 +971,7 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTest, SimpleRequestResponseWithLargeReject) { +TEST_P(EndToEndTestWithoutTls, SimpleRequestResponseWithLargeReject) { chlo_multiplier_ = 1; ASSERT_TRUE(Initialize()); @@ -979,7 +981,7 @@ EXPECT_TRUE(client_->client()->ReceivedInchoateReject()); } -TEST_P(EndToEndTestWithTls, SimpleRequestResponsev6) { +TEST_P(EndToEndTest, SimpleRequestResponsev6) { server_address_ = QuicSocketAddress(QuicIpAddress::Loopback6(), server_address_.port()); ASSERT_TRUE(Initialize()); @@ -988,7 +990,7 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTestWithTls, +TEST_P(EndToEndTest, ClientDoesNotAllowServerDataOnServerInitiatedBidirectionalStreams) { set_client_initial_max_stream_data_incoming_bidirectional(0); ASSERT_TRUE(Initialize()); @@ -996,7 +998,7 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTestWithTls, +TEST_P(EndToEndTest, ServerDoesNotAllowClientDataOnServerInitiatedBidirectionalStreams) { set_server_initial_max_stream_data_outgoing_bidirectional(0); ASSERT_TRUE(Initialize()); @@ -1004,7 +1006,7 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTestWithTls, +TEST_P(EndToEndTest, BothEndpointsDisallowDataOnServerInitiatedBidirectionalStreams) { set_client_initial_max_stream_data_incoming_bidirectional(0); set_server_initial_max_stream_data_outgoing_bidirectional(0); @@ -1017,7 +1019,7 @@ // initial packet. Undecryptable packets can be seen after the handshake // is complete due to dropping the initial keys at that point, so we only test // for undecryptable packets before then. -TEST_P(EndToEndTestWithTls, NoUndecryptablePacketsBeforeHandshakeComplete) { +TEST_P(EndToEndTest, NoUndecryptablePacketsBeforeHandshakeComplete) { ASSERT_TRUE(Initialize()); EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); @@ -1036,7 +1038,7 @@ server_thread_->Resume(); } -TEST_P(EndToEndTestWithTls, SeparateFinPacket) { +TEST_P(EndToEndTest, SeparateFinPacket) { ASSERT_TRUE(Initialize()); // Send a request in two parts: the request and then an empty packet with FIN. @@ -1060,7 +1062,7 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTestWithTls, MultipleRequestResponse) { +TEST_P(EndToEndTest, MultipleRequestResponse) { ASSERT_TRUE(Initialize()); EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); @@ -1069,7 +1071,7 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTest, MultipleRequestResponseZeroConnectionID) { +TEST_P(EndToEndTestWithoutTls, MultipleRequestResponseZeroConnectionID) { if (!GetParam().negotiated_version.AllowsVariableLengthConnectionIds()) { ASSERT_TRUE(Initialize()); return; @@ -1084,7 +1086,7 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTestWithTls, MultipleStreams) { +TEST_P(EndToEndTest, MultipleStreams) { // Verifies quic_test_client can track responses of all active streams. ASSERT_TRUE(Initialize()); @@ -1109,7 +1111,7 @@ } } -TEST_P(EndToEndTestWithTls, MultipleClients) { +TEST_P(EndToEndTest, MultipleClients) { ASSERT_TRUE(Initialize()); std::unique_ptr<QuicTestClient> client2(CreateQuicClient(nullptr)); @@ -1134,7 +1136,7 @@ EXPECT_EQ("200", client2->response_headers()->find(":status")->second); } -TEST_P(EndToEndTestWithTls, RequestOverMultiplePackets) { +TEST_P(EndToEndTest, RequestOverMultiplePackets) { // Send a large enough request to guarantee fragmentation. std::string huge_request = "/some/path?query=" + std::string(kMaxOutgoingPacketSize, '.'); @@ -1146,7 +1148,7 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTestWithTls, MultiplePacketsRandomOrder) { +TEST_P(EndToEndTest, MultiplePacketsRandomOrder) { // Send a large enough request to guarantee fragmentation. std::string huge_request = "/some/path?query=" + std::string(kMaxOutgoingPacketSize, '.'); @@ -1160,7 +1162,7 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTestWithTls, PostMissingBytes) { +TEST_P(EndToEndTest, PostMissingBytes) { ASSERT_TRUE(Initialize()); // Add a content length header with no body. @@ -1179,7 +1181,7 @@ EXPECT_EQ("500", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTest, LargePostNoPacketLoss) { +TEST_P(EndToEndTestWithoutTls, LargePostNoPacketLoss) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); @@ -1199,7 +1201,7 @@ VerifyCleanConnection(true); } -TEST_P(EndToEndTest, LargePostNoPacketLoss1sRTT) { +TEST_P(EndToEndTestWithoutTls, LargePostNoPacketLoss1sRTT) { ASSERT_TRUE(Initialize()); SetPacketSendDelay(QuicTime::Delta::FromMilliseconds(1000)); @@ -1218,7 +1220,7 @@ VerifyCleanConnection(false); } -TEST_P(EndToEndTest, LargePostWithPacketLoss) { +TEST_P(EndToEndTestWithoutTls, LargePostWithPacketLoss) { // Connect with lower fake packet loss than we'd like to test. // Until b/10126687 is fixed, losing handshake packets is pretty // brutal. @@ -1243,7 +1245,8 @@ } // Regression test for b/80090281. -TEST_P(EndToEndTest, LargePostWithPacketLossAndAlwaysBundleWindowUpdates) { +TEST_P(EndToEndTestWithoutTls, + LargePostWithPacketLossAndAlwaysBundleWindowUpdates) { ASSERT_TRUE(Initialize()); // Wait for the server SHLO before upping the packet loss. @@ -1273,7 +1276,7 @@ VerifyCleanConnection(true); } -TEST_P(EndToEndTest, LargePostWithPacketLossAndBlockedSocket) { +TEST_P(EndToEndTestWithoutTls, LargePostWithPacketLossAndBlockedSocket) { // Connect with lower fake packet loss than we'd like to test. Until // b/10126687 is fixed, losing handshake packets is pretty brutal. SetPacketLossPercentage(5); @@ -1296,7 +1299,7 @@ client_->SendCustomSynchronousRequest(headers, body)); } -TEST_P(EndToEndTest, LargePostNoPacketLossWithDelayAndReordering) { +TEST_P(EndToEndTestWithoutTls, LargePostNoPacketLossWithDelayAndReordering) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); @@ -1316,7 +1319,7 @@ client_->SendCustomSynchronousRequest(headers, body)); } -TEST_P(EndToEndTest, LargePostZeroRTTFailure) { +TEST_P(EndToEndTestWithoutTls, LargePostZeroRTTFailure) { // Send a request and then disconnect. This prepares the client to attempt // a 0-RTT handshake for the next request. ASSERT_TRUE(Initialize()); @@ -1367,7 +1370,7 @@ VerifyCleanConnection(false); } -TEST_P(EndToEndTest, SynchronousRequestZeroRTTFailure) { +TEST_P(EndToEndTestWithoutTls, SynchronousRequestZeroRTTFailure) { // Send a request and then disconnect. This prepares the client to attempt // a 0-RTT handshake for the next request. ASSERT_TRUE(Initialize()); @@ -1409,7 +1412,7 @@ VerifyCleanConnection(false); } -TEST_P(EndToEndTest, LargePostSynchronousRequest) { +TEST_P(EndToEndTestWithoutTls, LargePostSynchronousRequest) { // Send a request and then disconnect. This prepares the client to attempt // a 0-RTT handshake for the next request. ASSERT_TRUE(Initialize()); @@ -1461,7 +1464,7 @@ VerifyCleanConnection(false); } -TEST_P(EndToEndTest, RejectWithPacketLoss) { +TEST_P(EndToEndTestWithoutTls, RejectWithPacketLoss) { // In this test, we intentionally drop the first packet from the // server, which corresponds with the initial REJ response from // the server. @@ -1469,7 +1472,7 @@ ASSERT_TRUE(Initialize()); } -TEST_P(EndToEndTest, SetInitialReceivedConnectionOptions) { +TEST_P(EndToEndTestWithoutTls, SetInitialReceivedConnectionOptions) { QuicTagVector initial_received_options; initial_received_options.push_back(kTBBR); initial_received_options.push_back(kIW10); @@ -1495,7 +1498,7 @@ ContainsQuicTag(server_config_.ReceivedConnectionOptions(), kPRST)); } -TEST_P(EndToEndTest, LargePostSmallBandwidthLargeBuffer) { +TEST_P(EndToEndTestWithoutTls, LargePostSmallBandwidthLargeBuffer) { ASSERT_TRUE(Initialize()); SetPacketSendDelay(QuicTime::Delta::FromMicroseconds(1)); // 256KB per second with a 256KB buffer from server to client. Wireless @@ -1520,7 +1523,7 @@ VerifyCleanConnection(true); } -TEST_P(EndToEndTestWithTls, DoNotSetSendAlarmIfConnectionFlowControlBlocked) { +TEST_P(EndToEndTest, DoNotSetSendAlarmIfConnectionFlowControlBlocked) { // Regression test for b/14677858. // Test that the resume write alarm is not set in QuicConnection::OnCanWrite // if currently connection level flow control blocked. If set, this results in @@ -1561,9 +1564,9 @@ EXPECT_FALSE(send_alarm->IsSet()); } -// TODO(nharper): Needs to get turned back to EndToEndTestWithTls -// when we figure out why the test doesn't work on chrome. -TEST_P(EndToEndTest, InvalidStream) { +// TODO(b/154151800): Needs to get turned back to EndToEndTest when we figure +// out why the test doesn't work on chrome. +TEST_P(EndToEndTestWithoutTls, InvalidStream) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); @@ -1588,7 +1591,7 @@ // Test that if the server will close the connection if the client attempts // to send a request with overly large headers. -TEST_P(EndToEndTest, LargeHeaders) { +TEST_P(EndToEndTestWithoutTls, LargeHeaders) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); @@ -1616,7 +1619,7 @@ } } -TEST_P(EndToEndTest, EarlyResponseWithQuicStreamNoError) { +TEST_P(EndToEndTestWithoutTls, EarlyResponseWithQuicStreamNoError) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); @@ -1638,7 +1641,7 @@ } // TODO(rch): this test seems to cause net_unittests timeouts :| -TEST_P(EndToEndTestWithTls, QUIC_TEST_DISABLED_IN_CHROME(MultipleTermination)) { +TEST_P(EndToEndTest, QUIC_TEST_DISABLED_IN_CHROME(MultipleTermination)) { ASSERT_TRUE(Initialize()); // Set the offset so we won't frame. Otherwise when we pick up termination @@ -1658,9 +1661,9 @@ EXPECT_QUIC_BUG(client_->SendData("eep", true), "Fin already buffered"); } -// TODO(nharper): Needs to get turned back to EndToEndTestWithTls -// when we figure out why the test doesn't work on chrome. -TEST_P(EndToEndTest, Timeout) { +// TODO(b/154151800): Needs to get turned back to EndToEndTest when we figure +// out why the test doesn't work on chrome. +TEST_P(EndToEndTestWithoutTls, Timeout) { client_config_.SetIdleNetworkTimeout(QuicTime::Delta::FromMicroseconds(500), QuicTime::Delta::FromMicroseconds(500)); // Note: we do NOT ASSERT_TRUE: we may time out during initial handshake: @@ -1671,7 +1674,7 @@ } } -TEST_P(EndToEndTestWithTls, MaxDynamicStreamsLimitRespected) { +TEST_P(EndToEndTest, MaxDynamicStreamsLimitRespected) { // Set a limit on maximum number of incoming dynamic streams. // Make sure the limit is respected by the peer. const uint32_t kServerMaxDynamicStreams = 1; @@ -1714,7 +1717,7 @@ EXPECT_THAT(client_->connection_error(), IsQuicNoError()); } -TEST_P(EndToEndTest, SetIndependentMaxDynamicStreamsLimits) { +TEST_P(EndToEndTestWithoutTls, SetIndependentMaxDynamicStreamsLimits) { // Each endpoint can set max dynamic streams independently. const uint32_t kClientMaxDynamicStreams = 4; const uint32_t kServerMaxDynamicStreams = 3; @@ -1778,7 +1781,7 @@ server_thread_->Resume(); } -TEST_P(EndToEndTest, NegotiateCongestionControl) { +TEST_P(EndToEndTestWithoutTls, NegotiateCongestionControl) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); @@ -1809,7 +1812,7 @@ server_thread_->Resume(); } -TEST_P(EndToEndTest, ClientSuggestsRTT) { +TEST_P(EndToEndTestWithoutTls, ClientSuggestsRTT) { // Client suggests initial RTT, verify it is used. const QuicTime::Delta kInitialRTT = QuicTime::Delta::FromMicroseconds(20000); client_config_.SetInitialRoundTripTimeUsToSend(kInitialRTT.ToMicroseconds()); @@ -1835,7 +1838,7 @@ server_thread_->Resume(); } -TEST_P(EndToEndTest, ClientSuggestsIgnoredRTT) { +TEST_P(EndToEndTestWithoutTls, ClientSuggestsIgnoredRTT) { // Client suggests initial RTT, but also specifies NRTT, so it's not used. const QuicTime::Delta kInitialRTT = QuicTime::Delta::FromMicroseconds(20000); client_config_.SetInitialRoundTripTimeUsToSend(kInitialRTT.ToMicroseconds()); @@ -1864,7 +1867,7 @@ server_thread_->Resume(); } -TEST_P(EndToEndTest, MaxInitialRTT) { +TEST_P(EndToEndTestWithoutTls, MaxInitialRTT) { // Client tries to suggest twice the server's max initial rtt and the server // uses the max. client_config_.SetInitialRoundTripTimeUsToSend(2 * @@ -1892,7 +1895,7 @@ server_thread_->Resume(); } -TEST_P(EndToEndTest, MinInitialRTT) { +TEST_P(EndToEndTestWithoutTls, MinInitialRTT) { // Client tries to suggest 0 and the server uses the default. client_config_.SetInitialRoundTripTimeUsToSend(0); @@ -1920,7 +1923,7 @@ server_thread_->Resume(); } -TEST_P(EndToEndTest, 0ByteConnectionId) { +TEST_P(EndToEndTestWithoutTls, 0ByteConnectionId) { if (VersionHasIetfInvariantHeader( GetParam().negotiated_version.transport_version)) { // SetBytesForConnectionIdToSend only applies to Google QUIC encoding. @@ -1938,7 +1941,7 @@ EXPECT_EQ(CONNECTION_ID_ABSENT, header->source_connection_id_included); } -TEST_P(EndToEndTestWithTls, 8ByteConnectionId) { +TEST_P(EndToEndTest, 8ByteConnectionId) { if (VersionHasIetfInvariantHeader( GetParam().negotiated_version.transport_version)) { // SetBytesForConnectionIdToSend only applies to Google QUIC encoding. @@ -1956,7 +1959,7 @@ EXPECT_EQ(CONNECTION_ID_PRESENT, header->destination_connection_id_included); } -TEST_P(EndToEndTestWithTls, 15ByteConnectionId) { +TEST_P(EndToEndTest, 15ByteConnectionId) { if (VersionHasIetfInvariantHeader( GetParam().negotiated_version.transport_version)) { // SetBytesForConnectionIdToSend only applies to Google QUIC encoding. @@ -1975,7 +1978,7 @@ EXPECT_EQ(CONNECTION_ID_PRESENT, header->destination_connection_id_included); } -TEST_P(EndToEndTestWithTls, ResetConnection) { +TEST_P(EndToEndTest, ResetConnection) { ASSERT_TRUE(Initialize()); EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); @@ -1986,9 +1989,9 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -// TODO(nharper): Needs to get turned back to EndToEndTestWithTls -// when we figure out why the test doesn't work on chrome. -TEST_P(EndToEndTest, MaxStreamsUberTest) { +// TODO(b/154151800): Needs to get turned back to EndToEndTest when we figure +// out why the test doesn't work on chrome. +TEST_P(EndToEndTestWithoutTls, MaxStreamsUberTest) { // Connect with lower fake packet loss than we'd like to test. Until // b/10126687 is fixed, losing handshake packets is pretty brutal. SetPacketLossPercentage(1); @@ -2011,7 +2014,7 @@ } } -TEST_P(EndToEndTestWithTls, StreamCancelErrorTest) { +TEST_P(EndToEndTest, StreamCancelErrorTest) { ASSERT_TRUE(Initialize()); std::string small_body(256, 'a'); @@ -2042,7 +2045,7 @@ EXPECT_THAT(client_->connection_error(), IsQuicNoError()); } -TEST_P(EndToEndTest, ConnectionMigrationClientIPChanged) { +TEST_P(EndToEndTestWithoutTls, ConnectionMigrationClientIPChanged) { ASSERT_TRUE(Initialize()); EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); EXPECT_EQ("200", client_->response_headers()->find(":status")->second); @@ -2061,7 +2064,7 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTest, ConnectionMigrationClientPortChanged) { +TEST_P(EndToEndTestWithoutTls, ConnectionMigrationClientPortChanged) { // Tests that the client's port can change during an established QUIC // connection, and that doing so does not result in the connection being // closed by the server. @@ -2118,7 +2121,7 @@ EXPECT_NE(old_address.port(), new_address.port()); } -TEST_P(EndToEndTest, NegotiatedInitialCongestionWindow) { +TEST_P(EndToEndTestWithoutTls, NegotiatedInitialCongestionWindow) { SetQuicReloadableFlag(quic_unified_iw_options, true); client_extra_copts_.push_back(kIW03); @@ -2134,7 +2137,7 @@ EXPECT_EQ(3u, cwnd); } -TEST_P(EndToEndTest, DifferentFlowControlWindows) { +TEST_P(EndToEndTestWithoutTls, DifferentFlowControlWindows) { // Client and server can set different initial flow control receive windows. // These are sent in CHLO/SHLO. Tests that these values are exchanged properly // in the crypto handshake. @@ -2188,7 +2191,7 @@ } // Test negotiation of IFWA connection option. -TEST_P(EndToEndTest, NegotiatedServerInitialFlowControlWindow) { +TEST_P(EndToEndTestWithoutTls, NegotiatedServerInitialFlowControlWindow) { const uint32_t kClientStreamIFCW = 123456; const uint32_t kClientSessionIFCW = 234567; set_client_initial_stream_flow_control_receive_window(kClientStreamIFCW); @@ -2232,7 +2235,7 @@ GetClientSession()->flow_controller())); } -TEST_P(EndToEndTest, HeadersAndCryptoStreamsNoConnectionFlowControl) { +TEST_P(EndToEndTestWithoutTls, HeadersAndCryptoStreamsNoConnectionFlowControl) { // The special headers and crypto streams should be subject to per-stream flow // control limits, but should not be subject to connection level flow control const uint32_t kStreamIFCW = 32 * 1024; @@ -2296,7 +2299,7 @@ server_thread_->Resume(); } -TEST_P(EndToEndTest, FlowControlsSynced) { +TEST_P(EndToEndTestWithoutTls, FlowControlsSynced) { set_smaller_flow_control_receive_window(); ASSERT_TRUE(Initialize()); @@ -2399,7 +2402,7 @@ server_thread_->Resume(); } -TEST_P(EndToEndTestWithTls, RequestWithNoBodyWillNeverSendStreamFrameWithFIN) { +TEST_P(EndToEndTest, RequestWithNoBodyWillNeverSendStreamFrameWithFIN) { // A stream created on receipt of a simple request with no body will never get // a stream frame with a FIN. Verify that we don't keep track of the stream in // the locally closed streams map: it will never be removed if so. @@ -2453,7 +2456,7 @@ } }; -TEST_P(EndToEndTest, AckNotifierWithPacketLossAndBlockedSocket) { +TEST_P(EndToEndTestWithoutTls, AckNotifierWithPacketLossAndBlockedSocket) { // Verify that even in the presence of packet loss and occasionally blocked // socket, an AckNotifierDelegate will get informed that the data it is // interested in has been ACKed. This tests end-to-end ACK notification, and @@ -2520,7 +2523,7 @@ } // Send a public reset from the server. -TEST_P(EndToEndTestWithTls, ServerSendPublicReset) { +TEST_P(EndToEndTest, ServerSendPublicReset) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); @@ -2558,7 +2561,7 @@ // Send a public reset from the server for a different connection ID. // It should be ignored. -TEST_P(EndToEndTestWithTls, ServerSendPublicResetWithDifferentConnectionId) { +TEST_P(EndToEndTest, ServerSendPublicResetWithDifferentConnectionId) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); @@ -2611,7 +2614,7 @@ // Send a public reset from the client for a different connection ID. // It should be ignored. -TEST_P(EndToEndTestWithTls, ClientSendPublicResetWithDifferentConnectionId) { +TEST_P(EndToEndTest, ClientSendPublicResetWithDifferentConnectionId) { ASSERT_TRUE(Initialize()); // Send the public reset. @@ -2635,8 +2638,7 @@ // Send a version negotiation packet from the server for a different // connection ID. It should be ignored. -TEST_P(EndToEndTestWithTls, - ServerSendVersionNegotiationWithDifferentConnectionId) { +TEST_P(EndToEndTest, ServerSendVersionNegotiationWithDifferentConnectionId) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); @@ -2672,7 +2674,7 @@ // A bad header shouldn't tear down the connection, because the receiver can't // tell the connection ID. -TEST_P(EndToEndTestWithTls, BadPacketHeaderTruncated) { +TEST_P(EndToEndTest, BadPacketHeaderTruncated) { ASSERT_TRUE(Initialize()); // Start the connection. @@ -2703,7 +2705,7 @@ // A bad header shouldn't tear down the connection, because the receiver can't // tell the connection ID. -TEST_P(EndToEndTestWithTls, BadPacketHeaderFlags) { +TEST_P(EndToEndTest, BadPacketHeaderFlags) { ASSERT_TRUE(Initialize()); // Start the connection. @@ -2753,7 +2755,7 @@ // Send a packet from the client with bad encrypted data. The server should not // tear down the connection. -TEST_P(EndToEndTestWithTls, BadEncryptedData) { +TEST_P(EndToEndTest, BadEncryptedData) { ASSERT_TRUE(Initialize()); // Start the connection. @@ -2789,7 +2791,7 @@ EXPECT_EQ("200", client_->response_headers()->find(":status")->second); } -TEST_P(EndToEndTestWithTls, CanceledStreamDoesNotBecomeZombie) { +TEST_P(EndToEndTest, CanceledStreamDoesNotBecomeZombie) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); // Lose the request. @@ -2969,7 +2971,7 @@ int64_t body_bytes_; }; -TEST_P(EndToEndTest, EarlyResponseFinRecording) { +TEST_P(EndToEndTestWithoutTls, EarlyResponseFinRecording) { set_smaller_flow_control_receive_window(); // Verify that an incoming FIN is recorded in a stream object even if the read @@ -3037,7 +3039,7 @@ server_thread_->Resume(); } -TEST_P(EndToEndTestWithTls, Trailers) { +TEST_P(EndToEndTest, Trailers) { // Test sending and receiving HTTP/2 Trailers (trailing HEADERS frames). ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); @@ -3366,7 +3368,7 @@ } // TODO(fayang): this test seems to cause net_unittests timeouts :| -TEST_P(EndToEndTest, DISABLED_TestHugePostWithPacketLoss) { +TEST_P(EndToEndTestWithoutTls, DISABLED_TestHugePostWithPacketLoss) { // This test tests a huge post with introduced packet loss from client to // server and body size greater than 4GB, making sure QUIC code does not break // for 32-bit builds. @@ -3406,7 +3408,7 @@ } // TODO(fayang): this test seems to cause net_unittests timeouts :| -TEST_P(EndToEndTest, DISABLED_TestHugeResponseWithPacketLoss) { +TEST_P(EndToEndTestWithoutTls, DISABLED_TestHugeResponseWithPacketLoss) { // This test tests a huge response with introduced loss from server to client // and body size greater than 4GB, making sure QUIC code does not break for // 32-bit builds. @@ -3443,7 +3445,7 @@ } // Regression test for b/111515567 -TEST_P(EndToEndTest, AgreeOnStopWaiting) { +TEST_P(EndToEndTestWithoutTls, AgreeOnStopWaiting) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); @@ -3458,7 +3460,7 @@ } // Regression test for b/111515567 -TEST_P(EndToEndTest, AgreeOnStopWaitingWithNoStopWaitingOption) { +TEST_P(EndToEndTestWithoutTls, AgreeOnStopWaitingWithNoStopWaitingOption) { QuicTagVector options; options.push_back(kNSTP); client_config_.SetConnectionOptionsToSend(options); @@ -3475,7 +3477,7 @@ server_thread_->Resume(); } -TEST_P(EndToEndTest, ReleaseHeadersStreamBufferWhenIdle) { +TEST_P(EndToEndTestWithoutTls, ReleaseHeadersStreamBufferWhenIdle) { // Tests that when client side has no active request and no waiting // PUSH_PROMISE, its headers stream's sequencer buffer should be released. ASSERT_TRUE(Initialize()); @@ -3492,7 +3494,7 @@ EXPECT_FALSE(QuicStreamSequencerPeer::IsUnderlyingBufferAllocated(sequencer)); } -TEST_P(EndToEndTest, WayTooLongRequestHeaders) { +TEST_P(EndToEndTestWithoutTls, WayTooLongRequestHeaders) { ASSERT_TRUE(Initialize()); SpdyHeaderBlock headers; headers[":method"] = "GET"; @@ -3533,7 +3535,7 @@ size_t num_ping_frames_; }; -TEST_P(EndToEndTest, WindowUpdateInAck) { +TEST_P(EndToEndTestWithoutTls, WindowUpdateInAck) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); WindowUpdateObserver observer; @@ -3554,7 +3556,7 @@ EXPECT_EQ(0u, observer.num_ping_frames()); } -TEST_P(EndToEndTestWithTls, SendStatelessResetTokenInShlo) { +TEST_P(EndToEndTest, SendStatelessResetTokenInShlo) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); QuicConfig* config = client_->client()->session()->config(); @@ -3566,7 +3568,7 @@ } // Regression test for b/116200989. -TEST_P(EndToEndTest, +TEST_P(EndToEndTestWithoutTls, SendStatelessResetIfServerConnectionClosedLocallyDuringHandshake) { connect_to_server_on_initialize_ = false; ASSERT_TRUE(Initialize()); @@ -3589,7 +3591,7 @@ } // Regression test for b/116200989. -TEST_P(EndToEndTest, +TEST_P(EndToEndTestWithoutTls, SendStatelessResetIfServerConnectionClosedLocallyAfterHandshake) { // Prevent the connection from expiring in the time wait list. SetQuicFlag(FLAGS_quic_time_wait_list_seconds, 10000); @@ -3626,7 +3628,7 @@ } // Regression test of b/70782529. -TEST_P(EndToEndTest, DoNotCrashOnPacketWriteError) { +TEST_P(EndToEndTestWithoutTls, DoNotCrashOnPacketWriteError) { ASSERT_TRUE(Initialize()); BadPacketWriter* bad_writer = new BadPacketWriter(/*packet_causing_write_error=*/5, @@ -3647,7 +3649,7 @@ // Regression test for b/71711996. This test sends a connectivity probing packet // as its last sent packet, and makes sure the server's ACK of that packet does // not cause the client to fail. -TEST_P(EndToEndTest, LastPacketSentIsConnectivityProbing) { +TEST_P(EndToEndTestWithoutTls, LastPacketSentIsConnectivityProbing) { ASSERT_TRUE(Initialize()); EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); @@ -3665,7 +3667,7 @@ client_->WaitForDelayedAcks(); } -TEST_P(EndToEndTestWithTls, PreSharedKey) { +TEST_P(EndToEndTest, PreSharedKey) { client_config_.set_max_time_before_crypto_handshake( QuicTime::Delta::FromSeconds(5)); client_config_.set_max_idle_time_before_crypto_handshake( @@ -3689,8 +3691,7 @@ } // TODO: reenable once we have a way to make this run faster. -TEST_P(EndToEndTestWithTls, - QUIC_TEST_DISABLED_IN_CHROME(PreSharedKeyMismatch)) { +TEST_P(EndToEndTest, QUIC_TEST_DISABLED_IN_CHROME(PreSharedKeyMismatch)) { client_config_.set_max_time_before_crypto_handshake( QuicTime::Delta::FromSeconds(1)); client_config_.set_max_idle_time_before_crypto_handshake( @@ -3719,8 +3720,7 @@ } // TODO: reenable once we have a way to make this run faster. -TEST_P(EndToEndTestWithTls, - QUIC_TEST_DISABLED_IN_CHROME(PreSharedKeyNoClient)) { +TEST_P(EndToEndTest, QUIC_TEST_DISABLED_IN_CHROME(PreSharedKeyNoClient)) { client_config_.set_max_time_before_crypto_handshake( QuicTime::Delta::FromSeconds(1)); client_config_.set_max_idle_time_before_crypto_handshake( @@ -3742,8 +3742,7 @@ } // TODO: reenable once we have a way to make this run faster. -TEST_P(EndToEndTestWithTls, - QUIC_TEST_DISABLED_IN_CHROME(PreSharedKeyNoServer)) { +TEST_P(EndToEndTest, QUIC_TEST_DISABLED_IN_CHROME(PreSharedKeyNoServer)) { client_config_.set_max_time_before_crypto_handshake( QuicTime::Delta::FromSeconds(1)); client_config_.set_max_idle_time_before_crypto_handshake( @@ -3764,7 +3763,7 @@ EXPECT_THAT(client_->connection_error(), IsError(QUIC_HANDSHAKE_TIMEOUT)); } -TEST_P(EndToEndTest, RequestAndStreamRstInOnePacket) { +TEST_P(EndToEndTestWithoutTls, RequestAndStreamRstInOnePacket) { // Regression test for b/80234898. ASSERT_TRUE(Initialize()); @@ -3799,7 +3798,7 @@ EXPECT_THAT(client_->connection_error(), IsQuicNoError()); } -TEST_P(EndToEndTest, ResetStreamOnTtlExpires) { +TEST_P(EndToEndTestWithoutTls, ResetStreamOnTtlExpires) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); SetPacketLossPercentage(30); @@ -3816,7 +3815,7 @@ EXPECT_THAT(client_->stream_error(), IsStreamError(QUIC_STREAM_TTL_EXPIRED)); } -TEST_P(EndToEndTest, SendMessages) { +TEST_P(EndToEndTestWithoutTls, SendMessages) { ASSERT_TRUE(Initialize()); EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); QuicSession* client_session = GetClientSession(); @@ -3983,7 +3982,7 @@ // Test that STOP_SENDING makes it to the peer. Create a stream and send a // STOP_SENDING. The receiver should get a call to QuicStream::OnStopSending. -TEST_P(EndToEndTest, SimpleStopSendingTest) { +TEST_P(EndToEndTestWithoutTls, SimpleStopSendingTest) { const uint16_t kStopSendingTestCode = 123; ASSERT_TRUE(Initialize()); if (!VersionHasIetfQuicFrames(negotiated_version_.transport_version)) { @@ -4031,7 +4030,7 @@ static_cast<uint16_t>(client_stream->stream_error())); } -TEST_P(EndToEndTest, SimpleStopSendingRstStreamTest) { +TEST_P(EndToEndTestWithoutTls, SimpleStopSendingRstStreamTest) { ASSERT_TRUE(Initialize()); // Send a request without a fin, to keep the stream open @@ -4082,7 +4081,7 @@ bool error_returned_; }; -TEST_P(EndToEndTest, ZeroRttProtectedConnectionClose) { +TEST_P(EndToEndTestWithoutTls, ZeroRttProtectedConnectionClose) { // This test ensures ZERO_RTT_PROTECTED connection close could close a client // which has switched to forward secure. connect_to_server_on_initialize_ = @@ -4143,7 +4142,7 @@ bool error_returned_; }; -TEST_P(EndToEndTest, ForwardSecureConnectionClose) { +TEST_P(EndToEndTestWithoutTls, ForwardSecureConnectionClose) { // This test ensures ZERO_RTT_PROTECTED connection close is sent to a client // which has ZERO_RTT_PROTECTED encryption level. connect_to_server_on_initialize_ = @@ -4174,7 +4173,7 @@ // Test that the stream id manager closes the connection if a stream // in excess of the allowed maximum. -TEST_P(EndToEndTest, TooBigStreamIdClosesConnection) { +TEST_P(EndToEndTestWithoutTls, TooBigStreamIdClosesConnection) { // Has to be before version test, see EndToEndTest::TearDown() ASSERT_TRUE(Initialize()); if (!VersionHasIetfQuicFrames(negotiated_version_.transport_version)) { @@ -4208,7 +4207,7 @@ IS_IETF_STREAM_FRAME(GetClientSession()->transport_close_frame_type())); } -TEST_P(EndToEndTest, TestMaxPushId) { +TEST_P(EndToEndTestWithoutTls, TestMaxPushId) { // Has to be before version test, see EndToEndTest::TearDown() ASSERT_TRUE(Initialize()); if (!VersionHasIetfQuicFrames(negotiated_version_.transport_version)) { @@ -4229,7 +4228,7 @@ ->CanCreatePushStreamWithId(kMaxQuicStreamId)); } -TEST_P(EndToEndTest, CustomTransportParameters) { +TEST_P(EndToEndTestWithoutTls, CustomTransportParameters) { if (GetParam().negotiated_version.handshake_protocol != PROTOCOL_TLS1_3) { Initialize(); return;