Lines Matching full:client_
147 explicit ClientDelegate(QuicClient* client) : client_(client) {}
151 client_->OnEvent(client_->fd(), &event);
154 QuicClient* client_;
223 CHECK(client_.get() == NULL);
229 CHECK(client_.get() == NULL);
236 CHECK(client_.get() == NULL);
266 client_.reset(CreateQuicClient(client_writer_));
271 client_->client()->session()->connection())),
272 new ClientDelegate(client_->client()));
273 return client_->client()->connected();
354 client_->client()->session()->connection()->GetStats();
381 scoped_ptr<QuicTestClient> client_;
401 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
402 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
413 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
414 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
424 client_->SendMessage(request);
426 client_->SendData(string(), true);
428 client_->WaitForResponse();
429 EXPECT_EQ(kFooResponseBody, client_->response_body());
430 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
434 client_->SendMessage(request);
435 client_->SendData(string(), true);
436 client_->WaitForResponse();
437 EXPECT_EQ(kFooResponseBody, client_->response_body());
438 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
444 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
445 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
446 EXPECT_EQ(kBarResponseBody, client_->SendSynchronousRequest("/bar"));
447 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
459 client_->SendMessage(request);
462 client_->SendData("bar", true);
463 client_->WaitForResponse();
464 EXPECT_EQ(kFooResponseBody, client_->response_body());
465 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
481 EXPECT_EQ(kBarResponseBody, client_->SendSynchronousRequest(huge_request));
482 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
495 EXPECT_EQ(kBarResponseBody, client_->SendSynchronousRequest(huge_request));
496 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
510 client_->SendCustomSynchronousRequest(request);
511 EXPECT_EQ("bad", client_->response_body());
512 EXPECT_EQ(500u, client_->response_headers()->parsed_response_code());
520 client_->client()->WaitForCryptoHandshakeConfirmed();
530 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
538 client_->client()->WaitForCryptoHandshakeConfirmed();
548 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
559 client_->client()->WaitForCryptoHandshakeConfirmed();
570 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
581 client_->client()->WaitForCryptoHandshakeConfirmed();
593 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
599 client_->client()->WaitForCryptoHandshakeConfirmed();
612 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
632 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
633 EXPECT_EQ(2, client_->client()->session()->GetNumSentClientHellos());
635 client_->Disconnect();
638 client_->Connect();
645 client_->client()->WaitForCryptoHandshakeConfirmed();
647 client_->WaitForResponseForMs(-1);
648 ASSERT_TRUE(client_->client()->connected());
649 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
650 EXPECT_EQ(1, client_->client()->session()->GetNumSentClientHellos());
652 client_->Disconnect();
659 client_->Connect();
666 client_->client()->WaitForCryptoHandshakeConfirmed();
668 ASSERT_TRUE(client_->client()->connected());
669 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
670 EXPECT_EQ(2, client_->client()->session()->GetNumSentClientHellos());
680 client_->client()->WaitForCryptoHandshakeConfirmed();
685 client_->client()->session()->connection());
688 client_->SetFecPolicy(FEC_PROTECT_ALWAYS);
696 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
710 client_->client()->WaitForCryptoHandshakeConfirmed();
720 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
736 client_->client()->WaitForCryptoHandshakeConfirmed();
742 QuicSpdyClientStream* stream = client_->GetOrCreateStream();
743 QuicSession* session = client_->client()->session();
771 client_->client()->WaitForCryptoHandshakeConfirmed();
781 QuicSessionPeer::SetNextStreamId(client_->client()->session(), 2);
783 client_->SendCustomSynchronousRequest(request);
784 // EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error());
785 EXPECT_EQ(QUIC_PACKET_FOR_NONEXISTENT_STREAM, client_->connection_error());
800 QuicSpdyClientStream* stream = client_->GetOrCreateStream();
804 client_->SendData("bar", true);
805 client_->WaitForWriteToFlush();
810 false, client_->GetOrCreateStream());
812 EXPECT_DFATAL(client_->SendData("eep", true), "Fin already buffered");
822 while (client_->client()->connected()) {
823 client_->client()->WaitForEvents();
831 client_->client()->WaitForCryptoHandshakeConfirmed();
834 QuicSessionPeer::SetMaxOpenStreams(client_->client()->session(), 10);
842 client_->SendMessage(request);
843 client_->SendMessage(request);
844 client_->WaitForResponse();
846 EXPECT_FALSE(client_->connected());
847 EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error());
848 EXPECT_EQ(QUIC_TOO_MANY_OPEN_STREAMS, client_->connection_error());
858 client_->client()->WaitForCryptoHandshakeConfirmed();
859 QuicConfig* client_negotiated_config = client_->client()->session()->config();
872 client_->client()->WaitForCryptoHandshakeConfirmed();
882 client_->client()->session()->connection()->sent_packet_manager();
914 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
924 client_->client()->WaitForCryptoHandshakeConfirmed();
934 client_->client()->session()->connection()->sent_packet_manager();
955 client_->client()->WaitForCryptoHandshakeConfirmed();
965 client_->client()->session()->connection()->sent_packet_manager();
984 client_->client()->WaitForCryptoHandshakeConfirmed();
986 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
987 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
988 client_->ResetConnection();
989 EXPECT_EQ(kBarResponseBody, client_->SendSynchronousRequest("/bar"));
990 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
1002 client_->client()->WaitForCryptoHandshakeConfirmed();
1006 EXPECT_LT(0, client_->SendRequest("/large_response"));
1011 while (client_->client()->WaitForEvents() == true) {
1022 client_->client()->WaitForCryptoHandshakeConfirmed();
1024 QuicSession* session = client_->client()->session();
1027 EXPECT_LT(0, client_->SendRequest("/small_response"));
1028 client_->client()->WaitForEvents();
1036 while (client_->client()->WaitForEvents() == true) {
1040 EXPECT_EQ(QUIC_NO_ERROR, client_->connection_error());
1074 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
1075 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
1079 writer->set_writer(new QuicDefaultPacketWriter(client_->client()->fd()));
1080 QuicConnectionPeer::SetWriter(client_->client()->session()->connection(),
1083 client_->SendSynchronousRequest("/bar");
1085 EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error());
1086 EXPECT_EQ(QUIC_ERROR_MIGRATING_ADDRESS, client_->connection_error());
1097 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
1098 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
1101 IPEndPoint old_address = client_->client()->client_address();
1104 EpollServer* eps = client_->epoll_server();
1105 int old_fd = client_->client()->fd();
1109 QuicClientPeer::CreateUDPSocket(client_->client());
1113 client_->client()->CreateQuicPacketWriter();
1120 int new_port = client_->client()->client_address().port();
1121 QuicClientPeer::SetClientPort(client_->client(), new_port);
1123 client_->client()->session()->connection(),
1125 client_->client()->session()->connection()->self_address().address(),
1129 int new_fd = client_->client()->fd();
1130 eps->RegisterFD(new_fd, client_->client(), EPOLLIN | EPOLLOUT | EPOLLET);
1133 EXPECT_EQ(kBarResponseBody, client_->SendSynchronousRequest("/bar"));
1134 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
1137 IPEndPoint new_address = client_->client()->client_address();
1161 client_->client()->WaitForCryptoHandshakeConfirmed();
1165 EXPECT_EQ(kServerIFCW, client_->client()
1202 client_->client()->WaitForCryptoHandshakeConfirmed();
1206 QuicSpdyClientStream* stream = client_->GetOrCreateStream();
1211 client_->client()
1216 client_->client()
1224 client_->client()->session()->flow_controller()));