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

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: 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
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..113b1eb9b955c211d14dab49bf32cf463caca596 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,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();
+ spdy::SpdyFramer::set_enable_compression_default(true);
+}
+
} // namespace test_spdy3
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698