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

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

Issue 2933613002: Add quic_test_loopback used for tests only. (Closed)
Patch Set: Created 3 years, 6 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/platform/impl/quic_test_loopback_impl.cc ('k') | net/tools/quic/quic_client_test.cc » ('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 f73e32290e52925be948efa41b641c9dd7cca497..1b7e412e0e60d6ea395d15ebc04c3f108e0298de 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -35,6 +35,7 @@
#include "net/quic/platform/api/quic_str_cat.h"
#include "net/quic/platform/api/quic_string_piece.h"
#include "net/quic/platform/api/quic_test.h"
+#include "net/quic/platform/api/quic_test_loopback.h"
#include "net/quic/platform/api/quic_text_utils.h"
#include "net/quic/test_tools/crypto_test_utils.h"
#include "net/quic/test_tools/quic_config_peer.h"
@@ -299,7 +300,7 @@ class EndToEndTest : public QuicTestWithParam<TestParams> {
protected:
EndToEndTest()
: initialized_(false),
- server_address_(QuicSocketAddress(QuicIpAddress::Loopback4(), 0)),
+ server_address_(QuicSocketAddress(TestLoopback(), 0)),
server_hostname_("test.example.com"),
client_writer_(nullptr),
server_writer_(nullptr),
@@ -1600,7 +1601,6 @@ class WrongAddressWriter : public QuicPacketWriterWrapper {
TEST_P(EndToEndTest, ConnectionMigrationClientIPChanged) {
ASSERT_TRUE(Initialize());
-
EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
EXPECT_EQ("200", client_->response_headers()->find(":status")->second);
@@ -1608,8 +1608,7 @@ TEST_P(EndToEndTest, ConnectionMigrationClientIPChanged) {
QuicIpAddress old_host = client_->client()->GetLatestClientAddress().host();
// Migrate socket to the new IP address.
- QuicIpAddress new_host;
- new_host.FromString("127.0.0.2");
+ QuicIpAddress new_host = TestLoopback(2);
EXPECT_NE(old_host, new_host);
ASSERT_TRUE(client_->client()->MigrateSocket(new_host));
« no previous file with comments | « net/quic/platform/impl/quic_test_loopback_impl.cc ('k') | net/tools/quic/quic_client_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698