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

Unified Diff: net/spdy/spdy_test_util_spdy3.cc

Issue 9817014: Created a new class SpdyTestStateHelper to serve as a helper to manage the state of a number of SPD… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO Created 8 years, 9 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/spdy/spdy_test_util_spdy3.h ('k') | net/spdy/spdy_websocket_stream_spdy2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_util_spdy3.cc
diff --git a/net/spdy/spdy_test_util_spdy3.cc b/net/spdy/spdy_test_util_spdy3.cc
index 1958fdaf0b91cdde54b2f531a57ec6d8c805db3f..9595ca4d69c3bb19cb819abb00cd084a4885759f 100644
--- a/net/spdy/spdy_test_util_spdy3.cc
+++ b/net/spdy/spdy_test_util_spdy3.cc
@@ -15,6 +15,7 @@
#include "net/http/http_server_properties_impl.h"
#include "net/spdy/buffered_spdy_framer.h"
#include "net/spdy/spdy_http_utils.h"
+#include "net/spdy/spdy_session.h"
namespace net {
@@ -1007,6 +1008,20 @@ const SpdyHeaderInfo MakeSpdyHeader(spdy::SpdyControlType type) {
return kHeader;
}
+SpdyTestStateHelper::SpdyTestStateHelper() {
+ // Pings can be non-deterministic, because they are sent via timer.
+ SpdySession::set_enable_ping_based_connection_checking(false);
+ // Compression is per-session which makes it impossible to create
+ // SPDY frames with static methods.
+ spdy::SpdyFramer::set_enable_compression_default(false);
+}
+
+SpdyTestStateHelper::~SpdyTestStateHelper() {
+ SpdySession::ResetStaticSettingsToInit();
+ // TODO(rch): save/restore this value
+ spdy::SpdyFramer::set_enable_compression_default(true);
+}
+
} // namespace test_spdy3
} // namespace net
« no previous file with comments | « net/spdy/spdy_test_util_spdy3.h ('k') | net/spdy/spdy_websocket_stream_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698