| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stddef.h> | 5 #include <stddef.h> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <sys/epoll.h> | 7 #include <sys/epoll.h> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 HttpConstants::POST, "/foo"); | 653 HttpConstants::POST, "/foo"); |
| 654 request.AddBody(body, true); | 654 request.AddBody(body, true); |
| 655 | 655 |
| 656 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request)); | 656 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request)); |
| 657 VerifyCleanConnection(true); | 657 VerifyCleanConnection(true); |
| 658 } | 658 } |
| 659 | 659 |
| 660 TEST_P(EndToEndTest, LargePostSmallBandwidthLargeBuffer) { | 660 TEST_P(EndToEndTest, LargePostSmallBandwidthLargeBuffer) { |
| 661 ASSERT_TRUE(Initialize()); | 661 ASSERT_TRUE(Initialize()); |
| 662 SetPacketSendDelay(QuicTime::Delta::FromMicroseconds(1)); | 662 SetPacketSendDelay(QuicTime::Delta::FromMicroseconds(1)); |
| 663 // 256KB per second with a 256k buffer from server to client. Wireless | 663 // 256KB per second with a 256KB buffer from server to client. Wireless |
| 664 // clients commonly have larger buffers, but our max CWND is 200. | 664 // clients commonly have larger buffers, but our max CWND is 200. |
| 665 server_writer_->set_max_bandwidth_and_buffer_size( | 665 server_writer_->set_max_bandwidth_and_buffer_size( |
| 666 QuicBandwidth::FromBytesPerSecond(256 * 1024), 256 * 1024); | 666 QuicBandwidth::FromBytesPerSecond(256 * 1024), 256 * 1024); |
| 667 | 667 |
| 668 client_->client()->WaitForCryptoHandshakeConfirmed(); | 668 client_->client()->WaitForCryptoHandshakeConfirmed(); |
| 669 | 669 |
| 670 // 1 MB body. | 670 // 1 MB body. |
| 671 string body; | 671 string body; |
| 672 GenerateBody(&body, 1024 * 1024); | 672 GenerateBody(&body, 1024 * 1024); |
| 673 | 673 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 QuicSession* session = dispatcher->session_map().begin()->second; | 1059 QuicSession* session = dispatcher->session_map().begin()->second; |
| 1060 EXPECT_EQ(kClientIFCW, | 1060 EXPECT_EQ(kClientIFCW, |
| 1061 session->config()->ReceivedInitialFlowControlWindowBytes()); | 1061 session->config()->ReceivedInitialFlowControlWindowBytes()); |
| 1062 server_thread_->Resume(); | 1062 server_thread_->Resume(); |
| 1063 } | 1063 } |
| 1064 | 1064 |
| 1065 } // namespace | 1065 } // namespace |
| 1066 } // namespace test | 1066 } // namespace test |
| 1067 } // namespace tools | 1067 } // namespace tools |
| 1068 } // namespace net | 1068 } // namespace net |
| OLD | NEW |