| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 string body; | 444 string body; |
| 445 GenerateBody(&body, 1024 * 1024); | 445 GenerateBody(&body, 1024 * 1024); |
| 446 | 446 |
| 447 HTTPMessage request(HttpConstants::HTTP_1_1, | 447 HTTPMessage request(HttpConstants::HTTP_1_1, |
| 448 HttpConstants::POST, "/foo"); | 448 HttpConstants::POST, "/foo"); |
| 449 request.AddBody(body, true); | 449 request.AddBody(body, true); |
| 450 | 450 |
| 451 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request)); | 451 EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request)); |
| 452 QuicConnectionStats stats = | 452 QuicConnectionStats stats = |
| 453 client_->client()->session()->connection()->GetStats(); | 453 client_->client()->session()->connection()->GetStats(); |
| 454 // TODO(rtenneti): Enable packets_lost check after bug(12887145) is fixed. | 454 // TODO(ianswett): Restore the packets_lost expectation when fixing b/12887145 |
| 455 // EXPECT_EQ(0u, stats.packets_lost); | 455 // EXPECT_EQ(0u, stats.packets_lost); |
| 456 // EXPECT_EQ(0u, stats.rto_count); | 456 EXPECT_EQ(0u, stats.rto_count); |
| 457 } | 457 } |
| 458 | 458 |
| 459 TEST_P(EndToEndTest, LargePostNoPacketLoss1sRTT) { | 459 TEST_P(EndToEndTest, LargePostNoPacketLoss1sRTT) { |
| 460 ASSERT_TRUE(Initialize()); | 460 ASSERT_TRUE(Initialize()); |
| 461 SetPacketSendDelay(QuicTime::Delta::FromMilliseconds(1000)); | 461 SetPacketSendDelay(QuicTime::Delta::FromMilliseconds(1000)); |
| 462 | 462 |
| 463 client_->client()->WaitForCryptoHandshakeConfirmed(); | 463 client_->client()->WaitForCryptoHandshakeConfirmed(); |
| 464 | 464 |
| 465 // 1 Mb body. | 465 // 1 Mb body. |
| 466 string body; | 466 string body; |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 client_->SendSynchronousRequest("/bar"); | 892 client_->SendSynchronousRequest("/bar"); |
| 893 | 893 |
| 894 EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error()); | 894 EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error()); |
| 895 EXPECT_EQ(QUIC_ERROR_MIGRATING_ADDRESS, client_->connection_error()); | 895 EXPECT_EQ(QUIC_ERROR_MIGRATING_ADDRESS, client_->connection_error()); |
| 896 } | 896 } |
| 897 | 897 |
| 898 } // namespace | 898 } // namespace |
| 899 } // namespace test | 899 } // namespace test |
| 900 } // namespace tools | 900 } // namespace tools |
| 901 } // namespace net | 901 } // namespace net |
| OLD | NEW |