| 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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 WrongAddressWriter() { | 831 WrongAddressWriter() { |
| 832 IPAddressNumber ip; | 832 IPAddressNumber ip; |
| 833 CHECK(net::ParseIPLiteralToNumber("127.0.0.2", &ip)); | 833 CHECK(net::ParseIPLiteralToNumber("127.0.0.2", &ip)); |
| 834 self_address_ = IPEndPoint(ip, 0); | 834 self_address_ = IPEndPoint(ip, 0); |
| 835 } | 835 } |
| 836 | 836 |
| 837 virtual WriteResult WritePacket( | 837 virtual WriteResult WritePacket( |
| 838 const char* buffer, | 838 const char* buffer, |
| 839 size_t buf_len, | 839 size_t buf_len, |
| 840 const IPAddressNumber& real_self_address, | 840 const IPAddressNumber& real_self_address, |
| 841 const IPEndPoint& peer_address, | 841 const IPEndPoint& peer_address) OVERRIDE { |
| 842 QuicBlockedWriterInterface* blocked_writer) OVERRIDE { | |
| 843 // Use wrong address! | 842 // Use wrong address! |
| 844 return QuicPacketWriterWrapper::WritePacket( | 843 return QuicPacketWriterWrapper::WritePacket( |
| 845 buffer, buf_len, self_address_.address(), peer_address, blocked_writer); | 844 buffer, buf_len, self_address_.address(), peer_address); |
| 846 } | 845 } |
| 847 | 846 |
| 848 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE { | 847 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE { |
| 849 return false; | 848 return false; |
| 850 } | 849 } |
| 851 | 850 |
| 852 IPEndPoint self_address_; | 851 IPEndPoint self_address_; |
| 853 }; | 852 }; |
| 854 | 853 |
| 855 TEST_P(EndToEndTest, ConnectionMigration) { | 854 TEST_P(EndToEndTest, ConnectionMigration) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 868 client_->SendSynchronousRequest("/bar"); | 867 client_->SendSynchronousRequest("/bar"); |
| 869 | 868 |
| 870 EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error()); | 869 EXPECT_EQ(QUIC_STREAM_CONNECTION_ERROR, client_->stream_error()); |
| 871 EXPECT_EQ(QUIC_ERROR_MIGRATING_ADDRESS, client_->connection_error()); | 870 EXPECT_EQ(QUIC_ERROR_MIGRATING_ADDRESS, client_->connection_error()); |
| 872 } | 871 } |
| 873 | 872 |
| 874 } // namespace | 873 } // namespace |
| 875 } // namespace test | 874 } // namespace test |
| 876 } // namespace tools | 875 } // namespace tools |
| 877 } // namespace net | 876 } // namespace net |
| OLD | NEW |