src/net/url_request/url_request_quic_unittest.cc
// Tests that if two requests use the same QUIC session, the second request
// should not have |LoadTimingInfo::connect_timing|.
Tests that if two requests use the same QUIC session, the second request
should not have |LoadTimingInfo::connect_timing|.
Tests that if two requests use the same QUIC session the second request should not have |LoadTimingInfo :: connect_timing| .
TEST_P(URLRequestQuicTest, TestTwoRequests) {
  if (version().handshake_protocol == quic::PROTOCOL_TLS1_3) {
    Init();
    return;
  }
  base::RunLoop run_loop;
  WaitForCompletionNetworkDelegate network_delegate(
      run_loop.QuitClosure(), 2);
  SetNetworkDelegate(&network_delegate);
  Init();
  CheckLoadTimingDelegate delegate(false);
  delegate.set_on_complete(base::DoNothing());
  std::unique_ptr<URLRequest> request =
      CreateRequest(GURL(UrlFromPath(kHelloPath)), DEFAULT_PRIORITY, &delegate);
  CheckLoadTimingDelegate delegate2(true);
  delegate2.set_on_complete(base::DoNothing());
  std::unique_ptr<URLRequest> request2 = CreateRequest(
      GURL(UrlFromPath(kHelloPath)), DEFAULT_PRIORITY, &delegate2);
  request->Start();
  request2->Start();
  ASSERT_TRUE(request->is_pending());
  ASSERT_TRUE(request2->is_pending());
  run_loop.Run();
  EXPECT_EQ(OK, delegate.request_status());
  EXPECT_EQ(OK, delegate2.request_status());
  EXPECT_EQ(kHelloBodyValue, delegate.data_received());
  EXPECT_EQ(kHelloBodyValue, delegate2.data_received());
}
TEST_P ( URLRequestQuicTest , TestTwoRequests ) { if ( version ( ) . handshake_protocol == quic :: PROTOCOL_TLS1_3 ) { Init ( ) ; return ; } base :: RunLoop run_loop ; WaitForCompletionNetworkDelegate network_delegate ( run_loop . QuitClosure ( ) , 2 ) ; SetNetworkDelegate ( & network_delegate ) ; Init ( ) ; CheckLoadTimingDelegate delegate ( false ) ; delegate . set_on_complete ( base :: DoNothing ( ) ) ; std :: unique_ptr < URLRequest > request = CreateRequest ( GURL ( UrlFromPath ( kHelloPath ) ) , DEFAULT_PRIORITY , & delegate ) ; CheckLoadTimingDelegate delegate2 ( true ) ; delegate2 . set_on_complete ( base :: DoNothing ( ) ) ; std :: unique_ptr < URLRequest > request2 = CreateRequest ( GURL ( UrlFromPath ( kHelloPath ) ) , DEFAULT_PRIORITY , & delegate2 ) ; request -> Start ( ) ; request2 -> Start ( ) ; ASSERT_TRUE ( request -> is_pending ( ) ) ; ASSERT_TRUE ( request2 -> is_pending ( ) ) ; run_loop . Run ( ) ; EXPECT_EQ ( OK , delegate . request_status ( ) ) ; EXPECT_EQ ( OK , delegate2 . request_status ( ) ) ; EXPECT_EQ ( kHelloBodyValue , delegate . data_received ( ) ) ; EXPECT_EQ ( kHelloBodyValue , delegate2 . data_received ( ) ) ; }
Tests that if two requests use the same QUIC session, the second request
should not have |LoadTimingInfo::connect_timing|.
Tests that if two requests use the same QUIC session the second request should not have |LoadTimingInfo :: connect_timing| .
// TODO(crbug.com/1032263): Make this work with TLS. /*num_expected_requests=*/