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

Unified Diff: net/spdy/spdy_test_util_spdy2.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_spdy2.h ('k') | net/spdy/spdy_test_util_spdy3.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/spdy/spdy_test_util_spdy2.h ('k') | net/spdy/spdy_test_util_spdy3.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698