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

Unified Diff: net/spdy/spdy_network_transaction_spdy21_unittest.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_http_stream_spdy3_unittest.cc ('k') | net/spdy/spdy_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_network_transaction_spdy21_unittest.cc
diff --git a/net/spdy/spdy_network_transaction_spdy21_unittest.cc b/net/spdy/spdy_network_transaction_spdy21_unittest.cc
index 444b20336abae11a9cc27cb439b851161530d5cb..efae94b8fcfc90647f176fbe0411885bc59877c1 100644
--- a/net/spdy/spdy_network_transaction_spdy21_unittest.cc
+++ b/net/spdy/spdy_network_transaction_spdy21_unittest.cc
@@ -39,8 +39,6 @@ class SpdyNetworkTransactionSpdy21Test
protected:
virtual void SetUp() {
- // By default, all tests turn off compression.
- EnableCompression(false);
SpdySession::set_default_protocol(SSLClientSocket::kProtoSPDY21);
google_get_request_initialized_ = false;
google_post_request_initialized_ = false;
@@ -59,10 +57,6 @@ class SpdyNetworkTransactionSpdy21Test
HttpResponseInfo response_info;
};
- void EnableCompression(bool enabled) {
- spdy::SpdyFramer::set_enable_compression_default(enabled);
- }
-
// A helper class that handles all the initial npn/ssl setup.
class NormalSpdyTransactionHelper {
public:
@@ -529,6 +523,7 @@ class SpdyNetworkTransactionSpdy21Test
HttpRequestInfo google_post_request_;
HttpRequestInfo google_chunked_post_request_;
HttpRequestInfo google_get_push_request_;
+ SpdyTestStateHelper spdy_state_;
};
//-----------------------------------------------------------------------------
@@ -1055,8 +1050,6 @@ TEST_P(SpdyNetworkTransactionSpdy21Test, ThreeGetsWithMaxConcurrent) {
// user specified priority, we expect to see them inverted in
// the response from the server.
TEST_P(SpdyNetworkTransactionSpdy21Test, FourGetsWithMaxConcurrentPriority) {
- SpdySession::set_enable_ping_based_connection_checking(false);
-
// Construct the request.
scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
scoped_ptr<spdy::SpdyFrame> resp(ConstructSpdyGetSynReply(NULL, 0, 1));
@@ -3808,7 +3801,7 @@ TEST_P(SpdyNetworkTransactionSpdy21Test, PartialWrite) {
// the server. Verify that teardown is all clean.
TEST_P(SpdyNetworkTransactionSpdy21Test, DecompressFailureOnSynReply) {
// For this test, we turn on the normal compression.
- EnableCompression(true);
+ spdy::SpdyFramer::set_enable_compression_default(true);
scoped_ptr<spdy::SpdyFrame> compressed(
ConstructSpdyGet(NULL, 0, true, 1, LOWEST));
@@ -3833,8 +3826,6 @@ TEST_P(SpdyNetworkTransactionSpdy21Test, DecompressFailureOnSynReply) {
TransactionHelperResult out = helper.output();
EXPECT_EQ(ERR_SPDY_PROTOCOL_ERROR, out.rv);
data->Reset();
-
- EnableCompression(false);
}
// Test that the NetLog contains good data for a simple GET request.
« no previous file with comments | « net/spdy/spdy_http_stream_spdy3_unittest.cc ('k') | net/spdy/spdy_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698