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

Unified Diff: net/spdy/spdy_network_transaction_spdy2_unittest.cc

Issue 11415219: Move a number of static variables SPDY to HttpNetworkSession::Params. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix flip_in_mem_edsm_server Created 8 years 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_spdy3_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_spdy2_unittest.cc
diff --git a/net/spdy/spdy_network_transaction_spdy2_unittest.cc b/net/spdy/spdy_network_transaction_spdy2_unittest.cc
index 995d98e7a6f54a281b6151a03eaf17e4cfbc10ea..fc9fdf37b96fb0b1b9e2a9ea90a2cfad5c588131 100644
--- a/net/spdy/spdy_network_transaction_spdy2_unittest.cc
+++ b/net/spdy/spdy_network_transaction_spdy2_unittest.cc
@@ -45,7 +45,6 @@ class SpdyNetworkTransactionSpdy2Test
protected:
virtual void SetUp() {
- SpdySession::set_default_protocol(kProtoSPDY2);
google_get_request_initialized_ = false;
google_post_request_initialized_ = false;
google_chunked_post_request_initialized_ = false;
@@ -576,7 +575,6 @@ class SpdyNetworkTransactionSpdy2Test
HttpRequestInfo google_post_request_;
HttpRequestInfo google_chunked_post_request_;
HttpRequestInfo google_get_push_request_;
- SpdyTestStateHelper spdy_state_;
base::ScopedTempDir temp_dir_;
};
@@ -3533,9 +3531,6 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, PartialWrite) {
// In this test, we enable compression, but get a uncompressed SynReply from
// the server. Verify that teardown is all clean.
TEST_P(SpdyNetworkTransactionSpdy2Test, DecompressFailureOnSynReply) {
- // For this test, we turn on the normal compression.
- BufferedSpdyFramer::set_enable_compression_default(true);
-
scoped_ptr<SpdyFrame> compressed(
ConstructSpdyGet(NULL, 0, true, 1, LOWEST));
scoped_ptr<SpdyFrame> rst(
@@ -3552,8 +3547,10 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, DecompressFailureOnSynReply) {
DelayedSocketData data(1, reads, arraysize(reads),
writes, arraysize(writes));
+ SpdySessionDependencies* session_deps = new SpdySessionDependencies();
+ session_deps->enable_compression = true;
NormalSpdyTransactionHelper helper(CreateGetRequest(),
- BoundNetLog(), GetParam(), NULL);
+ BoundNetLog(), GetParam(), session_deps);
helper.RunToCompletion(&data);
TransactionHelperResult out = helper.output();
EXPECT_EQ(ERR_SPDY_PROTOCOL_ERROR, out.rv);
@@ -3649,7 +3646,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, NetLog) {
// on the network, but issued a Read for only 5 of those bytes) that the data
// flow still works correctly.
TEST_P(SpdyNetworkTransactionSpdy2Test, BufferFull) {
- BufferedSpdyFramer framer(2);
+ BufferedSpdyFramer framer(2, false);
scoped_ptr<SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
MockWrite writes[] = { CreateMockWrite(*req) };
@@ -3742,7 +3739,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, BufferFull) {
// at the same time, ensure that we don't notify a read completion for
// each data frame individually.
TEST_P(SpdyNetworkTransactionSpdy2Test, Buffering) {
- BufferedSpdyFramer framer(2);
+ BufferedSpdyFramer framer(2, false);
scoped_ptr<SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
MockWrite writes[] = { CreateMockWrite(*req) };
@@ -3836,7 +3833,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, Buffering) {
// Verify the case where we buffer data but read it after it has been buffered.
TEST_P(SpdyNetworkTransactionSpdy2Test, BufferedAll) {
- BufferedSpdyFramer framer(2);
+ BufferedSpdyFramer framer(2, false);
scoped_ptr<SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
MockWrite writes[] = { CreateMockWrite(*req) };
@@ -3927,7 +3924,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, BufferedAll) {
// Verify the case where we buffer data and close the connection.
TEST_P(SpdyNetworkTransactionSpdy2Test, BufferedClosed) {
- BufferedSpdyFramer framer(2);
+ BufferedSpdyFramer framer(2, false);
scoped_ptr<SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
MockWrite writes[] = { CreateMockWrite(*req) };
@@ -4017,7 +4014,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, BufferedClosed) {
// Verify the case where we buffer data and cancel the transaction.
TEST_P(SpdyNetworkTransactionSpdy2Test, BufferedCancelled) {
- BufferedSpdyFramer framer(2);
+ BufferedSpdyFramer framer(2, false);
scoped_ptr<SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
MockWrite writes[] = { CreateMockWrite(*req) };
« no previous file with comments | « net/spdy/spdy_http_stream_spdy3_unittest.cc ('k') | net/spdy/spdy_network_transaction_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698