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

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

Issue 14816006: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_PRIVATE_EXPORT to QuicWallTime Created 7 years, 7 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/simple_quic_framer.cc ('k') | net/tools/quic/quic_client.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 12e2da983fbb9c856b3d44ac56b1f73fae8840af..c03f9d842b959c9118b306a9ca20dc828a3d2f2e 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -109,6 +109,7 @@ class EndToEndTest : public ::testing::Test {
net::IPAddressNumber ip;
CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip));
server_address_ = IPEndPoint(ip, 0);
+ config_.SetDefaults();
AddToCache("GET", kLargeRequest, "HTTP/1.1", "200", "OK", kFooResponseBody);
AddToCache("GET", "https://www.google.com/foo",
@@ -123,7 +124,8 @@ class EndToEndTest : public ::testing::Test {
virtual QuicTestClient* CreateQuicClient() {
QuicTestClient* client = new QuicTestClient(server_address_,
- server_hostname_);
+ server_hostname_,
+ config_);
client->Connect();
return client;
}
@@ -152,8 +154,10 @@ class EndToEndTest : public ::testing::Test {
void StopServer() {
if (!server_started_)
return;
- server_thread_->quit()->Signal();
- server_thread_->Join();
+ if (server_thread_.get()) {
+ server_thread_->quit()->Signal();
+ server_thread_->Join();
+ }
}
void AddToCache(const StringPiece& method,
@@ -192,6 +196,7 @@ class EndToEndTest : public ::testing::Test {
scoped_ptr<ServerThread> server_thread_;
scoped_ptr<QuicTestClient> client_;
bool server_started_;
+ QuicConfig config_;
};
TEST_F(EndToEndTest, SimpleRequestResponse) {
@@ -499,11 +504,11 @@ TEST_F(EndToEndTest, MultipleTermination) {
}
/*TEST_F(EndToEndTest, Timeout) {
- FLAGS_negotiated_timeout_us = 500;
+ config_.set_idle_connection_state_lifetime(
+ QuicTime::Delta::FromMicroseconds(500));
// Note: we do NOT ASSERT_TRUE: we may time out during initial handshake:
// that's enough to validate timeout in this case.
Initialize();
-
while (client_->client()->connected()) {
client_->client()->WaitForEvents();
}
« no previous file with comments | « net/quic/test_tools/simple_quic_framer.cc ('k') | net/tools/quic/quic_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698