diff options
author | gavinp@google.com <gavinp@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-17 00:58:44 +0000 |
---|---|---|
committer | gavinp@google.com <gavinp@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-17 00:58:44 +0000 |
commit | 2bd930265ee663668e49d41eb35fddd94934eae2 (patch) | |
tree | 995f47c031908b58b5780b228fa405de1b0ff407 /net/spdy/spdy_http_stream_unittest.cc | |
parent | 485cd456a503e6698c75ea6185ed93de832d493a (diff) | |
download | chromium_src-2bd930265ee663668e49d41eb35fddd94934eae2.zip chromium_src-2bd930265ee663668e49d41eb35fddd94934eae2.tar.gz chromium_src-2bd930265ee663668e49d41eb35fddd94934eae2.tar.bz2 |
Implement MAX_CONCURRENT_STREAMS SETTINGS header
This CL helps chrome respect the SETTINGS header
MAX_CONCURRENT_STREAMS. Note that this means that
SpdySession::CreateStream can now return ERR_IO_PENDING, so it
requires a callback. There's a noted TODO that if an
http_network_transaction dissapears betweeen STATE_SPDY_GET_STREAM and
STATE_SPDY_SEND_REQUEST I don't know if we end up with an orphan stream
in our spdy_session.
As well, spdy_test_util.cc had a lot of functions with default arguments;
I didn't fix them all, but the functions I modified no longer take default
arguments and meet the coding standard. I'd like to circle back at some point
and possibly make the tests call SpdyFramer directly: these test utils seem
sometimes more trouble than they're worth if the framer was a bit more
convenient for direct use.
BUG=34750
TEST=net_unittests Spdy.ThreeGets*
Review URL: http://codereview.chromium.org/2919011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52791 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_http_stream_unittest.cc')
-rw-r--r-- | net/spdy/spdy_http_stream_unittest.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/spdy/spdy_http_stream_unittest.cc b/net/spdy/spdy_http_stream_unittest.cc index a2fdf58..5fab0e2 100644 --- a/net/spdy/spdy_http_stream_unittest.cc +++ b/net/spdy/spdy_http_stream_unittest.cc @@ -115,14 +115,11 @@ TEST_F(SpdyHttpStreamTest, SendRequest) { request.url = GURL("http://www.google.com/"); TestCompletionCallback callback; HttpResponseInfo response; - - scoped_refptr<SpdyStream> stream; + scoped_ptr<SpdyHttpStream> http_stream(new SpdyHttpStream()); ASSERT_EQ( OK, - session->CreateStream(request.url, HIGHEST, &stream, BoundNetLog())); - - scoped_ptr<SpdyHttpStream> http_stream(new SpdyHttpStream(stream.get())); - http_stream->InitializeRequest(request, base::Time::Now(), NULL); + http_stream->InitializeStream(session, request, BoundNetLog(), NULL)); + http_stream->InitializeRequest(base::Time::Now(), NULL); EXPECT_EQ(ERR_IO_PENDING, http_stream->SendRequest(&response, &callback)); |