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

Unified Diff: net/spdy/spdy_network_transaction_spdy3_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: Moar cleanup Created 8 years, 1 month 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_network_transaction_spdy3_unittest.cc
diff --git a/net/spdy/spdy_network_transaction_spdy3_unittest.cc b/net/spdy/spdy_network_transaction_spdy3_unittest.cc
index 5a9a40ca1d435ffb4023b86e53304560e389b564..c8a7014e6f9fb0264bfb86da9925b0849d283640 100644
--- a/net/spdy/spdy_network_transaction_spdy3_unittest.cc
+++ b/net/spdy/spdy_network_transaction_spdy3_unittest.cc
@@ -45,7 +45,6 @@ class SpdyNetworkTransactionSpdy3Test
protected:
virtual void SetUp() {
- SpdySession::set_default_protocol(kProtoSPDY3);
google_get_request_initialized_ = false;
google_post_request_initialized_ = false;
google_chunked_post_request_initialized_ = false;
@@ -577,7 +576,6 @@ class SpdyNetworkTransactionSpdy3Test
HttpRequestInfo google_post_request_;
HttpRequestInfo google_chunked_post_request_;
HttpRequestInfo google_get_push_request_;
- SpdyTestStateHelper spdy_state_;
base::ScopedTempDir temp_dir_;
};
@@ -4104,9 +4102,6 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, PartialWrite) {
// In this test, we enable compression, but get a uncompressed SynReply from
// the server. Verify that teardown is all clean.
TEST_P(SpdyNetworkTransactionSpdy3Test, 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(
@@ -4123,8 +4118,10 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, 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);
@@ -4220,7 +4217,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, NetLog) {
// on the network, but issued a Read for only 5 of those bytes) that the data
// flow still works correctly.
TEST_P(SpdyNetworkTransactionSpdy3Test, BufferFull) {
- BufferedSpdyFramer framer(3);
+ BufferedSpdyFramer framer(3, false);
scoped_ptr<SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
MockWrite writes[] = { CreateMockWrite(*req) };
@@ -4313,7 +4310,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, BufferFull) {
// at the same time, ensure that we don't notify a read completion for
// each data frame individually.
TEST_P(SpdyNetworkTransactionSpdy3Test, Buffering) {
- BufferedSpdyFramer framer(3);
+ BufferedSpdyFramer framer(3, false);
scoped_ptr<SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
MockWrite writes[] = { CreateMockWrite(*req) };
@@ -4407,7 +4404,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, Buffering) {
// Verify the case where we buffer data but read it after it has been buffered.
TEST_P(SpdyNetworkTransactionSpdy3Test, BufferedAll) {
- BufferedSpdyFramer framer(3);
+ BufferedSpdyFramer framer(3, false);
scoped_ptr<SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
MockWrite writes[] = { CreateMockWrite(*req) };
@@ -4498,7 +4495,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, BufferedAll) {
// Verify the case where we buffer data and close the connection.
TEST_P(SpdyNetworkTransactionSpdy3Test, BufferedClosed) {
- BufferedSpdyFramer framer(3);
+ BufferedSpdyFramer framer(3, false);
scoped_ptr<SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
MockWrite writes[] = { CreateMockWrite(*req) };
@@ -4588,7 +4585,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, BufferedClosed) {
// Verify the case where we buffer data and cancel the transaction.
TEST_P(SpdyNetworkTransactionSpdy3Test, BufferedCancelled) {
- BufferedSpdyFramer framer(3);
+ BufferedSpdyFramer framer(3, false);
scoped_ptr<SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
MockWrite writes[] = { CreateMockWrite(*req) };

Powered by Google App Engine
This is Rietveld 408576698