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

Unified Diff: net/spdy/spdy_session_spdy2_unittest.cc

Issue 15892015: [SPDY] Refactor SpdyStream state machine (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove default: Created 7 years, 7 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_network_transaction_spdy3_unittest.cc ('k') | net/spdy/spdy_session_spdy3_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_spdy2_unittest.cc
diff --git a/net/spdy/spdy_session_spdy2_unittest.cc b/net/spdy/spdy_session_spdy2_unittest.cc
index 4964f60a32b67101abf7abe0c802a697544d26ac..ab2394f1aeb4f4644f909ea450473e66fd986f4a 100644
--- a/net/spdy/spdy_session_spdy2_unittest.cc
+++ b/net/spdy/spdy_session_spdy2_unittest.cc
@@ -165,12 +165,16 @@ TEST_F(SpdySessionSpdy2Test, GoAway) {
GURL url("http://www.google.com");
base::WeakPtr<SpdyStream> spdy_stream1 =
- CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session, url, MEDIUM, BoundNetLog());
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM,
+ session, url, MEDIUM, BoundNetLog());
+ test::StreamDelegateDoNothing delegate1(spdy_stream1);
+ spdy_stream1->SetDelegate(&delegate1);
base::WeakPtr<SpdyStream> spdy_stream2 =
- CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session, url, MEDIUM, BoundNetLog());
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM,
+ session, url, MEDIUM, BoundNetLog());
+ test::StreamDelegateDoNothing delegate2(spdy_stream2);
+ spdy_stream2->SetDelegate(&delegate2);
scoped_ptr<SpdyHeaderBlock> headers(new SpdyHeaderBlock);
(*headers)["method"] = "GET";
@@ -1170,15 +1174,15 @@ TEST_F(SpdySessionSpdy2Test, OutOfOrderSynStreams) {
GURL url("http://www.google.com");
base::WeakPtr<SpdyStream> spdy_stream1 =
- CreateStreamSynchronously(
- SPDY_BIDIRECTIONAL_STREAM, session, url, LOWEST, BoundNetLog());
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM,
+ session, url, LOWEST, BoundNetLog());
ASSERT_TRUE(spdy_stream1.get() != NULL);
EXPECT_EQ(0u, spdy_stream1->stream_id());
test::StreamDelegateDoNothing delegate1(spdy_stream1);
spdy_stream1->SetDelegate(&delegate1);
base::WeakPtr<SpdyStream> spdy_stream2 =
- CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM,
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM,
session, url, HIGHEST, BoundNetLog());
ASSERT_TRUE(spdy_stream2.get() != NULL);
EXPECT_EQ(0u, spdy_stream2->stream_id());
@@ -2128,8 +2132,10 @@ TEST_F(SpdySessionSpdy2Test, GoAwayWhileInDoLoop) {
GURL url1("http://www.google.com");
base::WeakPtr<SpdyStream> spdy_stream1 =
- CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM,
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM,
session, url1, MEDIUM, BoundNetLog());
+ test::StreamDelegateDoNothing delegate1(spdy_stream1);
+ spdy_stream1->SetDelegate(&delegate1);
session = NULL;
ASSERT_TRUE(spdy_stream1.get() != NULL);
EXPECT_EQ(0u, spdy_stream1->stream_id());
@@ -2351,10 +2357,12 @@ TEST_F(SpdySessionSpdy2Test, CloseOneIdleConnectionFailsWhenSessionInUse) {
TestCompletionCallback callback1;
base::WeakPtr<SpdyStream> spdy_stream1 =
- CreateStreamSynchronously(SPDY_BIDIRECTIONAL_STREAM,
+ CreateStreamSynchronously(SPDY_REQUEST_RESPONSE_STREAM,
session1, url1, DEFAULT_PRIORITY,
BoundNetLog());
ASSERT_TRUE(spdy_stream1.get());
+ test::StreamDelegateDoNothing delegate1(spdy_stream1);
+ spdy_stream1->SetDelegate(&delegate1);
scoped_ptr<SpdyHeaderBlock> headers(
spdy_util_.ConstructGetHeaderBlock(url1.spec()));
« no previous file with comments | « net/spdy/spdy_network_transaction_spdy3_unittest.cc ('k') | net/spdy/spdy_session_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698