| 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 95b6648d0c9e32d4317661186d2871c771b225da..1aa03f04b8f8b7fbf597fc1b7c79e30df60a95b5 100644
|
| --- a/net/tools/quic/end_to_end_test.cc
|
| +++ b/net/tools/quic/end_to_end_test.cc
|
| @@ -25,6 +25,7 @@
|
| #include "net/tools/quic/test_tools/http_message_test_utils.h"
|
| #include "net/tools/quic/test_tools/quic_client_peer.h"
|
| #include "net/tools/quic/test_tools/quic_epoll_connection_helper_peer.h"
|
| +#include "net/tools/quic/test_tools/quic_in_memory_cache_peer.h"
|
| #include "net/tools/quic/test_tools/quic_test_client.h"
|
| #include "net/tools/quic/test_tools/server_thread.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -58,11 +59,6 @@ void GenerateBody(string* body, int length) {
|
| }
|
|
|
| class EndToEndTest : public ::testing::TestWithParam<QuicVersion> {
|
| - public:
|
| - static void SetUpTestCase() {
|
| - QuicInMemoryCache::GetInstance()->ResetForTests();
|
| - }
|
| -
|
| protected:
|
| EndToEndTest()
|
| : server_hostname_("example.com"),
|
| @@ -76,6 +72,7 @@ class EndToEndTest : public ::testing::TestWithParam<QuicVersion> {
|
| client_config_.SetDefaults();
|
| server_config_.SetDefaults();
|
|
|
| + QuicInMemoryCachePeer::ResetForTests();
|
| AddToCache("GET", kLargeRequest, "HTTP/1.1", "200", "OK", kFooResponseBody);
|
| AddToCache("GET", "https://www.google.com/foo",
|
| "HTTP/1.1", "200", "OK", kFooResponseBody);
|
| @@ -84,6 +81,10 @@ class EndToEndTest : public ::testing::TestWithParam<QuicVersion> {
|
| version_ = GetParam();
|
| }
|
|
|
| + virtual ~EndToEndTest() {
|
| + QuicInMemoryCachePeer::ResetForTests();
|
| + }
|
| +
|
| virtual QuicTestClient* CreateQuicClient() {
|
| QuicTestClient* client = new QuicTestClient(server_address_,
|
| server_hostname_,
|
| @@ -131,7 +132,7 @@ class EndToEndTest : public ::testing::TestWithParam<QuicVersion> {
|
| StringPiece response_code,
|
| StringPiece response_detail,
|
| StringPiece body) {
|
| - QuicInMemoryCache::GetInstance()->AddOrVerifyResponse(
|
| + QuicInMemoryCache::GetInstance()->AddSimpleResponse(
|
| method, path, version, response_code, response_detail, body);
|
| }
|
|
|
|
|