| 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 <sys/epoll.h> | 6 #include <sys/epoll.h> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 | 540 |
| 541 TEST_P(EndToEndTest, SimpleRequestResponseWithLargeReject) { | 541 TEST_P(EndToEndTest, SimpleRequestResponseWithLargeReject) { |
| 542 chlo_multiplier_ = 1; | 542 chlo_multiplier_ = 1; |
| 543 ASSERT_TRUE(Initialize()); | 543 ASSERT_TRUE(Initialize()); |
| 544 | 544 |
| 545 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); | 545 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); |
| 546 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); | 546 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); |
| 547 EXPECT_EQ(3, client_->client()->GetNumSentClientHellos()); | 547 EXPECT_EQ(3, client_->client()->GetNumSentClientHellos()); |
| 548 } | 548 } |
| 549 | 549 |
| 550 // TODO(rch): figure out how to detect missing v6 supprt (like on the linux | 550 // TODO(rch): figure out how to detect missing v6 support (like on the linux |
| 551 // try bots) and selectively disable this test. | 551 // try bots) and selectively disable this test. |
| 552 TEST_P(EndToEndTest, DISABLED_SimpleRequestResponsev6) { | 552 TEST_P(EndToEndTest, DISABLED_SimpleRequestResponsev6) { |
| 553 IPAddress ip; | 553 server_address_ = |
| 554 CHECK(ip.AssignFromIPLiteral("::1")); | 554 IPEndPoint(IPAddress::IPv6Localhost(), server_address_.port()); |
| 555 server_address_ = IPEndPoint(ip, server_address_.port()); | |
| 556 ASSERT_TRUE(Initialize()); | 555 ASSERT_TRUE(Initialize()); |
| 557 | 556 |
| 558 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); | 557 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); |
| 559 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); | 558 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); |
| 560 } | 559 } |
| 561 | 560 |
| 562 TEST_P(EndToEndTest, SeparateFinPacket) { | 561 TEST_P(EndToEndTest, SeparateFinPacket) { |
| 563 ASSERT_TRUE(Initialize()); | 562 ASSERT_TRUE(Initialize()); |
| 564 | 563 |
| 565 HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo"); | 564 HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo"); |
| (...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2366 // sending requests for them. | 2365 // sending requests for them. |
| 2367 EXPECT_EQ(1u, client_->num_requests()); | 2366 EXPECT_EQ(1u, client_->num_requests()); |
| 2368 // Including response to original request, 12 responses in total were | 2367 // Including response to original request, 12 responses in total were |
| 2369 // recieved. | 2368 // recieved. |
| 2370 EXPECT_EQ(12u, client_->num_responses()); | 2369 EXPECT_EQ(12u, client_->num_responses()); |
| 2371 } | 2370 } |
| 2372 | 2371 |
| 2373 } // namespace | 2372 } // namespace |
| 2374 } // namespace test | 2373 } // namespace test |
| 2375 } // namespace net | 2374 } // namespace net |
| OLD | NEW |