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 |