src/net/quic/quic_network_transaction_unittest.cc
// TODO(zhongyi): disabled this broken test as it was not testing the correct
// code path. Need a fix to re-enable this test, tracking at crbug.com/704596.
disabled this broken test as it was not testing the correct
code path. Need a fix to re-enable this test, tracking at crbug.com/704596.
disabled this broken test as it was not testing the correct code path . Need a fix to re - enable this test tracking at crbug . com / 704596 .
TEST_P(QuicNetworkTransactionTest,
       DISABLED_QuicUploadToAlternativeProxyServer) {
  base::HistogramTester histogram_tester;
  proxy_resolution_service_ =
      ConfiguredProxyResolutionService::CreateFixedFromPacResult(
          "HTTPS mail.example.org:443", TRAFFIC_ANNOTATION_FOR_TESTS);
  TestProxyDelegate test_proxy_delegate;
  test_proxy_delegate.set_alternative_proxy_server(
      ProxyServer::FromPacString("QUIC mail.example.org:443"));
  proxy_resolution_service_->SetProxyDelegate(&test_proxy_delegate);
  request_.url = GURL("http://mail.example.org/");
  MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
  MockWrite writes[] = {MockWrite(SYNCHRONOUS, ERR_FAILED, 1)};
  SequencedSocketData socket_data(reads, writes);
  socket_factory_.AddSocketDataProvider(&socket_data);
  AddHangingNonAlternateProtocolSocketData();
  CreateSession();
  request_.method = "POST";
  ChunkedUploadDataStream upload_data(0);
  upload_data.AppendData("1", 1, true);
  request_.upload_data_stream = &upload_data;
  HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
  TestCompletionCallback callback;
  int rv = trans.Start(&request_, callback.callback(), net_log_.bound());
  EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
  EXPECT_NE(OK, callback.WaitForResult());
  EXPECT_TRUE(test_proxy_delegate.alternative_proxy_server().is_quic());
  EXPECT_TRUE(session_->proxy_resolution_service()->proxy_retry_info().empty());
  histogram_tester.ExpectUniqueSample("Net.QuicAlternativeProxy.Usage",
                                      1 ,
                                      1);
}
TEST_P ( QuicNetworkTransactionTest , DISABLED_QuicUploadToAlternativeProxyServer ) { base :: HistogramTester histogram_tester ; proxy_resolution_service_ = ConfiguredProxyResolutionService :: CreateFixedFromPacResult ( " " , TRAFFIC_ANNOTATION_FOR_TESTS ) ; TestProxyDelegate test_proxy_delegate ; test_proxy_delegate . set_alternative_proxy_server ( ProxyServer :: FromPacString ( " " ) ) ; proxy_resolution_service_ -> SetProxyDelegate ( & test_proxy_delegate ) ; request_ . url = GURL ( " " ) ; MockRead reads [ ] = { MockRead ( SYNCHRONOUS , ERR_IO_PENDING , 0 ) } ; MockWrite writes [ ] = { MockWrite ( SYNCHRONOUS , ERR_FAILED , 1 ) } ; SequencedSocketData socket_data ( reads , writes ) ; socket_factory_ . AddSocketDataProvider ( & socket_data ) ; AddHangingNonAlternateProtocolSocketData ( ) ; CreateSession ( ) ; request_ . method = " " ; ChunkedUploadDataStream upload_data ( 0 ) ; upload_data . AppendData ( " " , 1 , true ) ; request_ . upload_data_stream = & upload_data ; HttpNetworkTransaction trans ( DEFAULT_PRIORITY , session_ . get ( ) ) ; TestCompletionCallback callback ; int rv = trans . Start ( & request_ , callback . callback ( ) , net_log_ . bound ( ) ) ; EXPECT_THAT ( rv , IsError ( ERR_IO_PENDING ) ) ; EXPECT_NE ( OK , callback . WaitForResult ( ) ) ; EXPECT_TRUE ( test_proxy_delegate . alternative_proxy_server ( ) . is_quic ( ) ) ; EXPECT_TRUE ( session_ -> proxy_resolution_service ( ) -> proxy_retry_info ( ) . empty ( ) ) ; histogram_tester . ExpectUniqueSample ( " " , 1 , 1 ) ; }
TODO(zhongyi): disabled this broken test as it was not testing the correct
code path.
TODO ( zhongyi ) : disabled this broken test as it was not testing the correct code path .
// The non-alternate protocol job needs to hang in order to guarantee that // the alternate-protocol job will "win". // Verify that the alternative proxy server is not marked as broken. // Verify that the proxy server is not marked as broken. /* ALTERNATIVE_PROXY_USAGE_WON_RACE */