Index: net/spdy/spdy_test_util_spdy2.cc |
diff --git a/net/spdy/spdy_test_util_spdy2.cc b/net/spdy/spdy_test_util_spdy2.cc |
index aadd177f55cbfa6c6f0bb5e021af31571543f8fd..ecc29beb8292d0bf8e17a0230d15aca1cd4f3d77 100644 |
--- a/net/spdy/spdy_test_util_spdy2.cc |
+++ b/net/spdy/spdy_test_util_spdy2.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 { |
namespace test_spdy2 { |
@@ -1006,5 +1007,19 @@ 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_spdy2 |
} // namespace net |