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

Unified Diff: net/quic/quic_network_transaction_unittest.cc

Issue 1916783003: QUIC - enable "delay_tcp_race" parameter by default. This feature showed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deleted unneeded hanging get calls from unittests Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_stream_factory_impl_unittest.cc ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_network_transaction_unittest.cc
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc
index d14e2f8f27e33b1cac4704fe601ddcd290fd558c..b8baec88340b25732820d6c3b3c702e58fe0813a 100644
--- a/net/quic/quic_network_transaction_unittest.cc
+++ b/net/quic/quic_network_transaction_unittest.cc
@@ -646,10 +646,6 @@ TEST_P(QuicNetworkTransactionTest, ForceQuic) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- // The non-alternate protocol job needs to hang in order to guarantee that
- // the alternate-protocol job will "win".
- AddHangingNonAlternateProtocolSocketData();
-
params_.parse_alternative_services = false;
params_.enable_alternative_service_with_different_host = false;
CreateSession();
@@ -773,7 +769,6 @@ TEST_P(QuicNetworkTransactionTest, QuicProxyWithCert) {
crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details2);
request_.url = GURL("http://" + origin_host);
- AddHangingNonAlternateProtocolSocketData();
CreateSession();
AddQuicAlternateProtocolMapping(MockCryptoClientStream::CONFIRM_HANDSHAKE);
SendRequestAndExpectQuicResponseFromProxyOnPort("hello!", 70);
@@ -815,7 +810,6 @@ TEST_P(QuicNetworkTransactionTest, AlternativeServicesDifferentHost) {
request_.url = GURL("https://" + origin.host());
AddQuicRemoteAlternativeServiceMapping(
MockCryptoClientStream::CONFIRM_HANDSHAKE, alternative);
- AddHangingNonAlternateProtocolSocketData();
CreateSession();
SendRequestAndExpectQuicResponse("hello!");
@@ -901,7 +895,6 @@ TEST_P(QuicNetworkTransactionTest, UseAlternativeServiceForQuic) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- AddHangingNonAlternateProtocolSocketData();
CreateSession();
SendRequestAndExpectHttpResponse("hello world");
@@ -936,7 +929,6 @@ TEST_P(QuicNetworkTransactionTest,
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- AddHangingNonAlternateProtocolSocketData();
CreateSession();
SendRequestAndExpectHttpResponse("hello world");
@@ -1037,7 +1029,6 @@ TEST_P(QuicNetworkTransactionTest, UseAlternativeServiceQuicSupportedVersion) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- AddHangingNonAlternateProtocolSocketData();
CreateSession();
SendRequestAndExpectHttpResponse("hello world");
@@ -1182,7 +1173,6 @@ TEST_P(QuicNetworkTransactionTest, UseExistingAlternativeServiceForQuic) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- AddHangingNonAlternateProtocolSocketData();
CreateSession();
SendRequestAndExpectHttpResponse("hello world");
@@ -1267,12 +1257,8 @@ TEST_P(QuicNetworkTransactionTest, UseFirstExistingAlternativeServiceForQuic) {
mock_quic_data.AddRead(ASYNC, 0); // EOF
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- AddHangingNonAlternateProtocolSocketData();
-
mock_quic_data2.AddSocketDataToFactory(&socket_factory_);
- AddHangingNonAlternateProtocolSocketData();
-
CreateSession();
SendRequestAndExpectHttpResponse("hello world");
@@ -1348,7 +1334,6 @@ TEST_P(QuicNetworkTransactionTest,
mock_quic_data.AddRead(ASYNC, 0); // EOF
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- AddHangingNonAlternateProtocolSocketData();
CreateSession();
@@ -1441,10 +1426,7 @@ TEST_P(QuicNetworkTransactionTest,
mock_quic_data2.AddRead(ASYNC, 0); // EOF
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- AddHangingNonAlternateProtocolSocketData();
-
mock_quic_data2.AddSocketDataToFactory(&socket_factory_);
- AddHangingNonAlternateProtocolSocketData();
CreateSession();
@@ -1490,7 +1472,6 @@ TEST_P(QuicNetworkTransactionTest, AlternativeServiceDifferentPort) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- AddHangingNonAlternateProtocolSocketData();
CreateSession();
SendRequestAndExpectHttpResponse("hello world");
@@ -1523,7 +1504,6 @@ TEST_P(QuicNetworkTransactionTest, ConfirmAlternativeService) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- AddHangingNonAlternateProtocolSocketData();
CreateSession();
AlternativeService alternative_service(QUIC,
@@ -1600,10 +1580,6 @@ TEST_P(QuicNetworkTransactionTest, UseAlternateProtocolForQuic) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- // The non-alternate protocol job needs to hang in order to guarantee that
- // the alternate-protocol job will "win".
- AddHangingNonAlternateProtocolSocketData();
-
params_.parse_alternative_services = false;
params_.parse_alternative_services = false;
CreateSession();
@@ -1639,10 +1615,6 @@ TEST_P(QuicNetworkTransactionTest, UseAlternateProtocolWithProbabilityForQuic) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- // The non-alternate protocol job needs to hang in order to guarantee that
- // the alternate-protocol job will "win".
- AddHangingNonAlternateProtocolSocketData();
-
params_.parse_alternative_services = false;
params_.parse_alternative_services = false;
CreateSession();
@@ -1678,10 +1650,6 @@ TEST_P(QuicNetworkTransactionTest, AlternateProtocolDifferentPort) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- // The non-alternate protocol job needs to hang in order to guarantee that
- // the alternate-protocol job will "win".
- AddHangingNonAlternateProtocolSocketData();
-
params_.parse_alternative_services = false;
CreateSession();
@@ -1715,10 +1683,6 @@ TEST_P(QuicNetworkTransactionTest, ConfirmAlternateProtocol) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- // The non-alternate protocol job needs to hang in order to guarantee that
- // the alternate-protocol job will "win".
- AddHangingNonAlternateProtocolSocketData();
-
params_.parse_alternative_services = false;
CreateSession();
@@ -1764,10 +1728,7 @@ TEST_P(QuicNetworkTransactionTest, UseAlternateProtocolForQuicForHttps) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- // The non-alternate protocol job needs to hang in order to guarantee that
- // the alternate-protocol job will "win".
AddHangingNonAlternateProtocolSocketData();
-
CreateSession();
// TODO(rtenneti): Test QUIC over HTTPS, GetSSLInfo().
@@ -1924,10 +1885,6 @@ TEST_P(QuicNetworkTransactionTest, ZeroRTTWithHttpRace) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- // The non-alternate protocol job needs to hang in order to guarantee that
- // the alternate-protocol job will "win".
- AddHangingNonAlternateProtocolSocketData();
-
CreateSession();
AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
SendRequestAndExpectQuicResponse("hello!");
@@ -2011,10 +1968,6 @@ TEST_P(QuicNetworkTransactionTest, ZeroRTTWithConfirmationRequired) {
mock_quic_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING); // No more data to read
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
- // The non-alternate protocol job needs to hang in order to guarantee that
- // the alternate-protocol job will "win".
- AddHangingNonAlternateProtocolSocketData();
-
// In order for a new QUIC session to be established via alternate-protocol
// without racing an HTTP connection, we need the host resolution to happen
// synchronously. Of course, even though QUIC *could* perform a 0-RTT
@@ -2028,6 +1981,10 @@ TEST_P(QuicNetworkTransactionTest, ZeroRTTWithConfirmationRequired) {
host_resolver_.Resolve(info, DEFAULT_PRIORITY, &address, CompletionCallback(),
nullptr, net_log_.bound());
+ // The non-alternate protocol job needs to hang in order to guarantee that
+ // the alternate-protocol job will "win".
+ AddHangingNonAlternateProtocolSocketData();
+
CreateSession();
session_->quic_stream_factory()->set_require_confirmation(true);
AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
@@ -2246,8 +2203,6 @@ TEST_P(QuicNetworkTransactionTest, FailedZeroRttBrokenAlternateProtocol) {
0);
socket_factory_.AddSocketDataProvider(&quic_data);
- AddHangingNonAlternateProtocolSocketData();
-
// Second Alternate-protocol job which will race with the TCP job.
StaticSocketDataProvider quic_data2(quic_reads, arraysize(quic_reads),
nullptr, 0);
@@ -2264,6 +2219,7 @@ TEST_P(QuicNetworkTransactionTest, FailedZeroRttBrokenAlternateProtocol) {
socket_factory_.AddSocketDataProvider(&http_data);
socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
+ AddHangingNonAlternateProtocolSocketData();
CreateSession();
AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
@@ -2381,7 +2337,6 @@ TEST_P(QuicNetworkTransactionTest, SecureResourceOverSecureQuic) {
mock_quic_data.AddSocketDataToFactory(&socket_factory_);
request_.url = GURL("https://www.example.org:443");
- AddHangingNonAlternateProtocolSocketData();
CreateSession();
AddQuicAlternateProtocolMapping(MockCryptoClientStream::CONFIRM_HANDSHAKE);
SendRequestAndExpectQuicResponse("hello!");
@@ -2399,10 +2354,6 @@ TEST_P(QuicNetworkTransactionTest, QuicUpload) {
arraysize(writes));
socket_factory_.AddSocketDataProvider(&socket_data);
- // The non-alternate protocol job needs to hang in order to guarantee that
- // the alternate-protocol job will "win".
- AddHangingNonAlternateProtocolSocketData();
-
params_.parse_alternative_services = false;
params_.enable_alternative_service_with_different_host = false;
CreateSession();
« no previous file with comments | « net/http/http_stream_factory_impl_unittest.cc ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698