Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: net/tools/quic/end_to_end_test.cc

Issue 1565303002: Change IPEndpoint::address() to return a net::IPAddress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback eroman Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 402
403 void StartServer() { 403 void StartServer() {
404 server_thread_.reset(new ServerThread( 404 server_thread_.reset(new ServerThread(
405 new QuicTestServer(CryptoTestUtils::ProofSourceForTesting(), 405 new QuicTestServer(CryptoTestUtils::ProofSourceForTesting(),
406 server_config_, server_supported_versions_), 406 server_config_, server_supported_versions_),
407 server_address_, strike_register_no_startup_period_)); 407 server_address_, strike_register_no_startup_period_));
408 if (chlo_multiplier_ != 0) { 408 if (chlo_multiplier_ != 0) {
409 server_thread_->server()->SetChloMultiplier(chlo_multiplier_); 409 server_thread_->server()->SetChloMultiplier(chlo_multiplier_);
410 } 410 }
411 server_thread_->Initialize(); 411 server_thread_->Initialize();
412 server_address_ = 412 server_address_ = IPEndPoint(server_address_.address().bytes(),
413 IPEndPoint(server_address_.address(), server_thread_->GetPort()); 413 server_thread_->GetPort());
414 QuicDispatcher* dispatcher = 414 QuicDispatcher* dispatcher =
415 QuicServerPeer::GetDispatcher(server_thread_->server()); 415 QuicServerPeer::GetDispatcher(server_thread_->server());
416 TestWriterFactory* packet_writer_factory = new TestWriterFactory(); 416 TestWriterFactory* packet_writer_factory = new TestWriterFactory();
417 QuicDispatcherPeer::SetPacketWriterFactory(dispatcher, 417 QuicDispatcherPeer::SetPacketWriterFactory(dispatcher,
418 packet_writer_factory); 418 packet_writer_factory);
419 QuicDispatcherPeer::UseWriter(dispatcher, server_writer_); 419 QuicDispatcherPeer::UseWriter(dispatcher, server_writer_);
420 420
421 FLAGS_enable_quic_stateless_reject_support = 421 FLAGS_enable_quic_stateless_reject_support =
422 GetParam().server_uses_stateless_rejects_if_peer_supported; 422 GetParam().server_uses_stateless_rejects_if_peer_supported;
423 423
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 CHECK(net::ParseIPLiteralToNumber("127.0.0.2", &ip)); 1462 CHECK(net::ParseIPLiteralToNumber("127.0.0.2", &ip));
1463 self_address_ = IPEndPoint(ip, 0); 1463 self_address_ = IPEndPoint(ip, 0);
1464 } 1464 }
1465 1465
1466 WriteResult WritePacket(const char* buffer, 1466 WriteResult WritePacket(const char* buffer,
1467 size_t buf_len, 1467 size_t buf_len,
1468 const IPAddressNumber& /*real_self_address*/, 1468 const IPAddressNumber& /*real_self_address*/,
1469 const IPEndPoint& peer_address) override { 1469 const IPEndPoint& peer_address) override {
1470 // Use wrong address! 1470 // Use wrong address!
1471 return QuicPacketWriterWrapper::WritePacket( 1471 return QuicPacketWriterWrapper::WritePacket(
1472 buffer, buf_len, self_address_.address(), peer_address); 1472 buffer, buf_len, self_address_.address().bytes(), peer_address);
1473 } 1473 }
1474 1474
1475 bool IsWriteBlockedDataBuffered() const override { return false; } 1475 bool IsWriteBlockedDataBuffered() const override { return false; }
1476 1476
1477 IPEndPoint self_address_; 1477 IPEndPoint self_address_;
1478 }; 1478 };
1479 1479
1480 TEST_P(EndToEndTest, ConnectionMigrationClientIPChanged) { 1480 TEST_P(EndToEndTest, ConnectionMigrationClientIPChanged) {
1481 ASSERT_TRUE(Initialize()); 1481 ASSERT_TRUE(Initialize());
1482 1482
1483 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); 1483 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
1484 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); 1484 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
1485 1485
1486 // Store the client IP address which was used to send the first request. 1486 // Store the client IP address which was used to send the first request.
1487 IPAddressNumber old_host = client_->client()->client_address().address(); 1487 IPAddressNumber old_host =
1488 client_->client()->client_address().address().bytes();
1488 1489
1489 // Migrate socket to the new IP address. 1490 // Migrate socket to the new IP address.
1490 IPAddressNumber new_host; 1491 IPAddressNumber new_host;
1491 CHECK(net::ParseIPLiteralToNumber("127.0.0.2", &new_host)); 1492 CHECK(net::ParseIPLiteralToNumber("127.0.0.2", &new_host));
1492 EXPECT_NE(old_host, new_host); 1493 EXPECT_NE(old_host, new_host);
1493 ASSERT_TRUE(client_->client()->MigrateSocket(new_host)); 1494 ASSERT_TRUE(client_->client()->MigrateSocket(new_host));
1494 1495
1495 // Send a request using the new socket. 1496 // Send a request using the new socket.
1496 EXPECT_EQ(kBarResponseBody, client_->SendSynchronousRequest("/bar")); 1497 EXPECT_EQ(kBarResponseBody, client_->SendSynchronousRequest("/bar"));
1497 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); 1498 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
(...skipping 23 matching lines...) Expand all
1521 // The packet writer needs to be updated to use the new FD. 1522 // The packet writer needs to be updated to use the new FD.
1522 client_->client()->CreateQuicPacketWriter(); 1523 client_->client()->CreateQuicPacketWriter();
1523 1524
1524 // Change the internal state of the client and connection to use the new port, 1525 // Change the internal state of the client and connection to use the new port,
1525 // this is done because in a real NAT rebinding the client wouldn't see any 1526 // this is done because in a real NAT rebinding the client wouldn't see any
1526 // port change, and so expects no change to incoming port. 1527 // port change, and so expects no change to incoming port.
1527 // This is kind of ugly, but needed as we are simply swapping out the client 1528 // This is kind of ugly, but needed as we are simply swapping out the client
1528 // FD rather than any more complex NAT rebinding simulation. 1529 // FD rather than any more complex NAT rebinding simulation.
1529 int new_port = client_->client()->client_address().port(); 1530 int new_port = client_->client()->client_address().port();
1530 QuicClientPeer::SetClientPort(client_->client(), new_port); 1531 QuicClientPeer::SetClientPort(client_->client(), new_port);
1531 QuicConnectionPeer::SetSelfAddress( 1532 QuicConnectionPeer::SetSelfAddress(client_->client()->session()->connection(),
1532 client_->client()->session()->connection(), 1533 IPEndPoint(client_->client()
1533 IPEndPoint( 1534 ->session()
1534 client_->client()->session()->connection()->self_address().address(), 1535 ->connection()
1535 new_port)); 1536 ->self_address()
1537 .address()
1538 .bytes(),
1539 new_port));
1536 1540
1537 // Register the new FD for epoll events. 1541 // Register the new FD for epoll events.
1538 int new_fd = client_->client()->fd(); 1542 int new_fd = client_->client()->fd();
1539 eps->RegisterFD(new_fd, client_->client(), EPOLLIN | EPOLLOUT | EPOLLET); 1543 eps->RegisterFD(new_fd, client_->client(), EPOLLIN | EPOLLOUT | EPOLLET);
1540 1544
1541 // Send a second request, using the new FD. 1545 // Send a second request, using the new FD.
1542 EXPECT_EQ(kBarResponseBody, client_->SendSynchronousRequest("/bar")); 1546 EXPECT_EQ(kBarResponseBody, client_->SendSynchronousRequest("/bar"));
1543 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); 1547 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
1544 1548
1545 // Verify that the client's ephemeral port is different. 1549 // Verify that the client's ephemeral port is different.
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 Perspective::IS_SERVER); 1805 Perspective::IS_SERVER);
1802 scoped_ptr<QuicEncryptedPacket> packet(framer.BuildPublicResetPacket(header)); 1806 scoped_ptr<QuicEncryptedPacket> packet(framer.BuildPublicResetPacket(header));
1803 testing::NiceMock<MockQuicConnectionDebugVisitor> visitor; 1807 testing::NiceMock<MockQuicConnectionDebugVisitor> visitor;
1804 client_->client()->session()->connection()->set_debug_visitor(&visitor); 1808 client_->client()->session()->connection()->set_debug_visitor(&visitor);
1805 EXPECT_CALL(visitor, OnIncorrectConnectionId(incorrect_connection_id)) 1809 EXPECT_CALL(visitor, OnIncorrectConnectionId(incorrect_connection_id))
1806 .Times(1); 1810 .Times(1);
1807 // We must pause the server's thread in order to call WritePacket without 1811 // We must pause the server's thread in order to call WritePacket without
1808 // race conditions. 1812 // race conditions.
1809 server_thread_->Pause(); 1813 server_thread_->Pause();
1810 server_writer_->WritePacket(packet->data(), packet->length(), 1814 server_writer_->WritePacket(packet->data(), packet->length(),
1811 server_address_.address(), 1815 server_address_.address().bytes(),
1812 client_->client()->client_address()); 1816 client_->client()->client_address());
1813 server_thread_->Resume(); 1817 server_thread_->Resume();
1814 1818
1815 // The connection should be unaffected. 1819 // The connection should be unaffected.
1816 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); 1820 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
1817 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); 1821 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
1818 1822
1819 client_->client()->session()->connection()->set_debug_visitor(nullptr); 1823 client_->client()->session()->connection()->set_debug_visitor(nullptr);
1820 } 1824 }
1821 1825
1822 // Send a public reset from the client for a different connection ID. 1826 // Send a public reset from the client for a different connection ID.
1823 // It should be ignored. 1827 // It should be ignored.
1824 TEST_P(EndToEndTest, ClientSendPublicResetWithDifferentConnectionId) { 1828 TEST_P(EndToEndTest, ClientSendPublicResetWithDifferentConnectionId) {
1825 ASSERT_TRUE(Initialize()); 1829 ASSERT_TRUE(Initialize());
1826 1830
1827 // Send the public reset. 1831 // Send the public reset.
1828 QuicConnectionId incorrect_connection_id = 1832 QuicConnectionId incorrect_connection_id =
1829 client_->client()->session()->connection()->connection_id() + 1; 1833 client_->client()->session()->connection()->connection_id() + 1;
1830 QuicPublicResetPacket header; 1834 QuicPublicResetPacket header;
1831 header.public_header.connection_id = incorrect_connection_id; 1835 header.public_header.connection_id = incorrect_connection_id;
1832 header.public_header.reset_flag = true; 1836 header.public_header.reset_flag = true;
1833 header.public_header.version_flag = false; 1837 header.public_header.version_flag = false;
1834 header.rejected_packet_number = 10101; 1838 header.rejected_packet_number = 10101;
1835 QuicFramer framer(server_supported_versions_, QuicTime::Zero(), 1839 QuicFramer framer(server_supported_versions_, QuicTime::Zero(),
1836 Perspective::IS_CLIENT); 1840 Perspective::IS_CLIENT);
1837 scoped_ptr<QuicEncryptedPacket> packet(framer.BuildPublicResetPacket(header)); 1841 scoped_ptr<QuicEncryptedPacket> packet(framer.BuildPublicResetPacket(header));
1838 client_writer_->WritePacket(packet->data(), packet->length(), 1842 client_writer_->WritePacket(
1839 client_->client()->client_address().address(), 1843 packet->data(), packet->length(),
1840 server_address_); 1844 client_->client()->client_address().address().bytes(), server_address_);
1841 1845
1842 // The connection should be unaffected. 1846 // The connection should be unaffected.
1843 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); 1847 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
1844 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); 1848 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
1845 } 1849 }
1846 1850
1847 // Send a version negotiation packet from the server for a different 1851 // Send a version negotiation packet from the server for a different
1848 // connection ID. It should be ignored. 1852 // connection ID. It should be ignored.
1849 TEST_P(EndToEndTest, ServerSendVersionNegotiationWithDifferentConnectionId) { 1853 TEST_P(EndToEndTest, ServerSendVersionNegotiationWithDifferentConnectionId) {
1850 ASSERT_TRUE(Initialize()); 1854 ASSERT_TRUE(Initialize());
1851 1855
1852 // Send the version negotiation packet. 1856 // Send the version negotiation packet.
1853 QuicConnectionId incorrect_connection_id = 1857 QuicConnectionId incorrect_connection_id =
1854 client_->client()->session()->connection()->connection_id() + 1; 1858 client_->client()->session()->connection()->connection_id() + 1;
1855 scoped_ptr<QuicEncryptedPacket> packet( 1859 scoped_ptr<QuicEncryptedPacket> packet(
1856 QuicFramer::BuildVersionNegotiationPacket(incorrect_connection_id, 1860 QuicFramer::BuildVersionNegotiationPacket(incorrect_connection_id,
1857 server_supported_versions_)); 1861 server_supported_versions_));
1858 testing::NiceMock<MockQuicConnectionDebugVisitor> visitor; 1862 testing::NiceMock<MockQuicConnectionDebugVisitor> visitor;
1859 client_->client()->session()->connection()->set_debug_visitor(&visitor); 1863 client_->client()->session()->connection()->set_debug_visitor(&visitor);
1860 EXPECT_CALL(visitor, OnIncorrectConnectionId(incorrect_connection_id)) 1864 EXPECT_CALL(visitor, OnIncorrectConnectionId(incorrect_connection_id))
1861 .Times(1); 1865 .Times(1);
1862 // We must pause the server's thread in order to call WritePacket without 1866 // We must pause the server's thread in order to call WritePacket without
1863 // race conditions. 1867 // race conditions.
1864 server_thread_->Pause(); 1868 server_thread_->Pause();
1865 server_writer_->WritePacket(packet->data(), packet->length(), 1869 server_writer_->WritePacket(packet->data(), packet->length(),
1866 server_address_.address(), 1870 server_address_.address().bytes(),
1867 client_->client()->client_address()); 1871 client_->client()->client_address());
1868 server_thread_->Resume(); 1872 server_thread_->Resume();
1869 1873
1870 // The connection should be unaffected. 1874 // The connection should be unaffected.
1871 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); 1875 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
1872 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); 1876 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
1873 1877
1874 client_->client()->session()->connection()->set_debug_visitor(nullptr); 1878 client_->client()->session()->connection()->set_debug_visitor(nullptr);
1875 } 1879 }
1876 1880
1877 // A bad header shouldn't tear down the connection, because the receiver can't 1881 // A bad header shouldn't tear down the connection, because the receiver can't
1878 // tell the connection ID. 1882 // tell the connection ID.
1879 TEST_P(EndToEndTest, BadPacketHeaderTruncated) { 1883 TEST_P(EndToEndTest, BadPacketHeaderTruncated) {
1880 ASSERT_TRUE(Initialize()); 1884 ASSERT_TRUE(Initialize());
1881 1885
1882 // Start the connection. 1886 // Start the connection.
1883 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); 1887 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
1884 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); 1888 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
1885 1889
1886 // Packet with invalid public flags. 1890 // Packet with invalid public flags.
1887 char packet[] = {// public flags (8 byte connection_id) 1891 char packet[] = {// public flags (8 byte connection_id)
1888 0x3C, 1892 0x3C,
1889 // truncated connection ID 1893 // truncated connection ID
1890 0x11}; 1894 0x11};
1891 client_writer_->WritePacket(&packet[0], sizeof(packet), 1895 client_writer_->WritePacket(
1892 client_->client()->client_address().address(), 1896 &packet[0], sizeof(packet),
1893 server_address_); 1897 client_->client()->client_address().address().bytes(), server_address_);
1894 // Give the server time to process the packet. 1898 // Give the server time to process the packet.
1895 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100)); 1899 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100));
1896 // Pause the server so we can access the server's internals without races. 1900 // Pause the server so we can access the server's internals without races.
1897 server_thread_->Pause(); 1901 server_thread_->Pause();
1898 QuicDispatcher* dispatcher = 1902 QuicDispatcher* dispatcher =
1899 QuicServerPeer::GetDispatcher(server_thread_->server()); 1903 QuicServerPeer::GetDispatcher(server_thread_->server());
1900 EXPECT_EQ(QUIC_INVALID_PACKET_HEADER, 1904 EXPECT_EQ(QUIC_INVALID_PACKET_HEADER,
1901 QuicDispatcherPeer::GetAndClearLastError(dispatcher)); 1905 QuicDispatcherPeer::GetAndClearLastError(dispatcher));
1902 server_thread_->Resume(); 1906 server_thread_->Resume();
1903 1907
(...skipping 15 matching lines...) Expand all
1919 char packet[] = { 1923 char packet[] = {
1920 // invalid public flags 1924 // invalid public flags
1921 0xFF, 1925 0xFF,
1922 // connection_id 1926 // connection_id
1923 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE, 1927 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
1924 // packet sequence number 1928 // packet sequence number
1925 0xBC, 0x9A, 0x78, 0x56, 0x34, 0x12, 1929 0xBC, 0x9A, 0x78, 0x56, 0x34, 0x12,
1926 // private flags 1930 // private flags
1927 0x00, 1931 0x00,
1928 }; 1932 };
1929 client_writer_->WritePacket(&packet[0], sizeof(packet), 1933 client_writer_->WritePacket(
1930 client_->client()->client_address().address(), 1934 &packet[0], sizeof(packet),
1931 server_address_); 1935 client_->client()->client_address().address().bytes(), server_address_);
1932 // Give the server time to process the packet. 1936 // Give the server time to process the packet.
1933 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100)); 1937 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100));
1934 // Pause the server so we can access the server's internals without races. 1938 // Pause the server so we can access the server's internals without races.
1935 server_thread_->Pause(); 1939 server_thread_->Pause();
1936 QuicDispatcher* dispatcher = 1940 QuicDispatcher* dispatcher =
1937 QuicServerPeer::GetDispatcher(server_thread_->server()); 1941 QuicServerPeer::GetDispatcher(server_thread_->server());
1938 EXPECT_EQ(QUIC_INVALID_PACKET_HEADER, 1942 EXPECT_EQ(QUIC_INVALID_PACKET_HEADER,
1939 QuicDispatcherPeer::GetAndClearLastError(dispatcher)); 1943 QuicDispatcherPeer::GetAndClearLastError(dispatcher));
1940 server_thread_->Resume(); 1944 server_thread_->Resume();
1941 1945
(...skipping 12 matching lines...) Expand all
1954 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); 1958 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
1955 1959
1956 scoped_ptr<QuicEncryptedPacket> packet(ConstructEncryptedPacket( 1960 scoped_ptr<QuicEncryptedPacket> packet(ConstructEncryptedPacket(
1957 client_->client()->session()->connection()->connection_id(), false, false, 1961 client_->client()->session()->connection()->connection_id(), false, false,
1958 1, "At least 20 characters.", PACKET_8BYTE_CONNECTION_ID, 1962 1, "At least 20 characters.", PACKET_8BYTE_CONNECTION_ID,
1959 PACKET_6BYTE_PACKET_NUMBER)); 1963 PACKET_6BYTE_PACKET_NUMBER));
1960 // Damage the encrypted data. 1964 // Damage the encrypted data.
1961 string damaged_packet(packet->data(), packet->length()); 1965 string damaged_packet(packet->data(), packet->length());
1962 damaged_packet[30] ^= 0x01; 1966 damaged_packet[30] ^= 0x01;
1963 DVLOG(1) << "Sending bad packet."; 1967 DVLOG(1) << "Sending bad packet.";
1964 client_writer_->WritePacket(damaged_packet.data(), damaged_packet.length(), 1968 client_writer_->WritePacket(
1965 client_->client()->client_address().address(), 1969 damaged_packet.data(), damaged_packet.length(),
1966 server_address_); 1970 client_->client()->client_address().address().bytes(), server_address_);
1967 // Give the server time to process the packet. 1971 // Give the server time to process the packet.
1968 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100)); 1972 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100));
1969 // This error is sent to the connection's OnError (which ignores it), so the 1973 // This error is sent to the connection's OnError (which ignores it), so the
1970 // dispatcher doesn't see it. 1974 // dispatcher doesn't see it.
1971 // Pause the server so we can access the server's internals without races. 1975 // Pause the server so we can access the server's internals without races.
1972 server_thread_->Pause(); 1976 server_thread_->Pause();
1973 QuicDispatcher* dispatcher = 1977 QuicDispatcher* dispatcher =
1974 QuicServerPeer::GetDispatcher(server_thread_->server()); 1978 QuicServerPeer::GetDispatcher(server_thread_->server());
1975 EXPECT_EQ(QUIC_NO_ERROR, 1979 EXPECT_EQ(QUIC_NO_ERROR,
1976 QuicDispatcherPeer::GetAndClearLastError(dispatcher)); 1980 QuicDispatcherPeer::GetAndClearLastError(dispatcher));
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
2167 2171
2168 EXPECT_EQ(kBody, client_->SendSynchronousRequest("/trailer_url")); 2172 EXPECT_EQ(kBody, client_->SendSynchronousRequest("/trailer_url"));
2169 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); 2173 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code());
2170 EXPECT_EQ(trailers, client_->response_trailers()); 2174 EXPECT_EQ(trailers, client_->response_trailers());
2171 } 2175 }
2172 2176
2173 } // namespace 2177 } // namespace
2174 } // namespace test 2178 } // namespace test
2175 } // namespace tools 2179 } // namespace tools
2176 } // namespace net 2180 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698