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

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

Issue 24596008: Cleanup of QuicInMemoryCache to sync with internal version. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing files Created 7 years, 3 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/tools/flip_server/noop_balsa_visitor.h ('k') | net/tools/quic/quic_in_memory_cache.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 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);
}
« no previous file with comments | « net/tools/flip_server/noop_balsa_visitor.h ('k') | net/tools/quic/quic_in_memory_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698