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

Unified Diff: net/tools/quic/end_to_end_test.cc

Issue 1662433002: Per-packet options now passed through to QuicPacketWriter, instead of (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113054959
Patch Set: Fix comments for Patch Set 1 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/quic_default_packet_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/end_to_end_test.cc
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index adeded978e6ab62ba3d6b17b760d89b574c6ec5f..3c0d5c611b7dadef45e95e3dbe26cc72be7c4e68 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -1461,10 +1461,12 @@ class WrongAddressWriter : public QuicPacketWriterWrapper {
WriteResult WritePacket(const char* buffer,
size_t buf_len,
const IPAddressNumber& /*real_self_address*/,
- const IPEndPoint& peer_address) override {
+ const IPEndPoint& peer_address,
+ PerPacketOptions* options) override {
// Use wrong address!
- return QuicPacketWriterWrapper::WritePacket(
- buffer, buf_len, self_address_.address().bytes(), peer_address);
+ return QuicPacketWriterWrapper::WritePacket(buffer, buf_len,
+ self_address_.address().bytes(),
+ peer_address, options);
}
bool IsWriteBlockedDataBuffered() const override { return false; }
@@ -1803,9 +1805,9 @@ TEST_P(EndToEndTest, ServerSendPublicResetWithDifferentConnectionId) {
// We must pause the server's thread in order to call WritePacket without
// race conditions.
server_thread_->Pause();
- server_writer_->WritePacket(packet->data(), packet->length(),
- server_address_.address().bytes(),
- client_->client()->GetLatestClientAddress());
+ server_writer_->WritePacket(
+ packet->data(), packet->length(), server_address_.address().bytes(),
+ client_->client()->GetLatestClientAddress(), nullptr);
server_thread_->Resume();
// The connection should be unaffected.
@@ -1834,7 +1836,7 @@ TEST_P(EndToEndTest, ClientSendPublicResetWithDifferentConnectionId) {
client_writer_->WritePacket(
packet->data(), packet->length(),
client_->client()->GetLatestClientAddress().address().bytes(),
- server_address_);
+ server_address_, nullptr);
// The connection should be unaffected.
EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
@@ -1859,9 +1861,9 @@ TEST_P(EndToEndTest, ServerSendVersionNegotiationWithDifferentConnectionId) {
// We must pause the server's thread in order to call WritePacket without
// race conditions.
server_thread_->Pause();
- server_writer_->WritePacket(packet->data(), packet->length(),
- server_address_.address().bytes(),
- client_->client()->GetLatestClientAddress());
+ server_writer_->WritePacket(
+ packet->data(), packet->length(), server_address_.address().bytes(),
+ client_->client()->GetLatestClientAddress(), nullptr);
server_thread_->Resume();
// The connection should be unaffected.
@@ -1888,7 +1890,7 @@ TEST_P(EndToEndTest, BadPacketHeaderTruncated) {
client_writer_->WritePacket(
&packet[0], sizeof(packet),
client_->client()->GetLatestClientAddress().address().bytes(),
- server_address_);
+ server_address_, nullptr);
// Give the server time to process the packet.
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100));
// Pause the server so we can access the server's internals without races.
@@ -1927,7 +1929,7 @@ TEST_P(EndToEndTest, BadPacketHeaderFlags) {
client_writer_->WritePacket(
&packet[0], sizeof(packet),
client_->client()->GetLatestClientAddress().address().bytes(),
- server_address_);
+ server_address_, nullptr);
// Give the server time to process the packet.
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100));
// Pause the server so we can access the server's internals without races.
@@ -1963,7 +1965,7 @@ TEST_P(EndToEndTest, BadEncryptedData) {
client_writer_->WritePacket(
damaged_packet.data(), damaged_packet.length(),
client_->client()->GetLatestClientAddress().address().bytes(),
- server_address_);
+ server_address_, nullptr);
// Give the server time to process the packet.
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100));
// This error is sent to the connection's OnError (which ignores it), so the
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/quic_default_packet_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698