| Index: net/spdy/spdy_http_stream_unittest.cc
|
| diff --git a/net/spdy/spdy_http_stream_unittest.cc b/net/spdy/spdy_http_stream_unittest.cc
|
| index d20d822493adb4c47ade8179f6411b93eed6db2b..bdd450abe488a4d9beaac63ea89025a19aca350f 100644
|
| --- a/net/spdy/spdy_http_stream_unittest.cc
|
| +++ b/net/spdy/spdy_http_stream_unittest.cc
|
| @@ -66,9 +66,7 @@ void TestLoadTimingNotReused(const HttpStream& stream) {
|
| class SpdyHttpStreamTest : public testing::Test,
|
| public testing::WithParamInterface<NextProto> {
|
| public:
|
| - SpdyHttpStreamTest()
|
| - : spdy_util_(GetParam()),
|
| - session_deps_(GetParam()) {
|
| + SpdyHttpStreamTest() : spdy_util_(GetParam()), session_deps_(GetParam()) {
|
| session_deps_.net_log = &net_log_;
|
| }
|
|
|
| @@ -87,8 +85,10 @@ class SpdyHttpStreamTest : public testing::Test,
|
| // Initializes the session using DeterministicSocketData. It's advisable
|
| // to use this function rather than the OrderedSocketData, since the
|
| // DeterministicSocketData behaves in a reasonable manner.
|
| - void InitSessionDeterministic(MockRead* reads, size_t reads_count,
|
| - MockWrite* writes, size_t writes_count,
|
| + void InitSessionDeterministic(MockRead* reads,
|
| + size_t reads_count,
|
| + MockWrite* writes,
|
| + size_t writes_count,
|
| const SpdySessionKey& key) {
|
| deterministic_data_.reset(
|
| new DeterministicSocketData(reads, reads_count, writes, writes_count));
|
| @@ -100,20 +100,21 @@ class SpdyHttpStreamTest : public testing::Test,
|
| }
|
|
|
| // Initializes the session using the finicky OrderedSocketData class.
|
| - void InitSession(MockRead* reads, size_t reads_count,
|
| - MockWrite* writes, size_t writes_count,
|
| + void InitSession(MockRead* reads,
|
| + size_t reads_count,
|
| + MockWrite* writes,
|
| + size_t writes_count,
|
| const SpdySessionKey& key) {
|
| - data_.reset(new OrderedSocketData(reads, reads_count,
|
| - writes, writes_count));
|
| + data_.reset(
|
| + new OrderedSocketData(reads, reads_count, writes, writes_count));
|
| session_deps_.socket_factory->AddSocketDataProvider(data_.get());
|
| http_session_ = SpdySessionDependencies::SpdyCreateSession(&session_deps_);
|
| session_ = CreateInsecureSpdySession(http_session_, key, BoundNetLog());
|
| }
|
|
|
| - void TestSendCredentials(
|
| - ServerBoundCertService* server_bound_cert_service,
|
| - const std::string& cert,
|
| - const std::string& proof);
|
| + void TestSendCredentials(ServerBoundCertService* server_bound_cert_service,
|
| + const std::string& cert,
|
| + const std::string& proof);
|
|
|
| SpdyTestUtil spdy_util_;
|
| CapturingNetLog net_log_;
|
| @@ -127,22 +128,23 @@ class SpdyHttpStreamTest : public testing::Test,
|
| MockECSignatureCreatorFactory ec_signature_creator_factory_;
|
| };
|
|
|
| -INSTANTIATE_TEST_CASE_P(
|
| - NextProto,
|
| - SpdyHttpStreamTest,
|
| - testing::Values(kProtoDeprecatedSPDY2,
|
| - kProtoSPDY3, kProtoSPDY31, kProtoSPDY4));
|
| +INSTANTIATE_TEST_CASE_P(NextProto,
|
| + SpdyHttpStreamTest,
|
| + testing::Values(kProtoDeprecatedSPDY2,
|
| + kProtoSPDY3,
|
| + kProtoSPDY31,
|
| + kProtoSPDY4));
|
|
|
| // SpdyHttpStream::GetUploadProgress() should still work even before the
|
| // stream is initialized.
|
| TEST_P(SpdyHttpStreamTest, GetUploadProgressBeforeInitialization) {
|
| MockRead reads[] = {
|
| - MockRead(ASYNC, 0, 0) // EOF
|
| + MockRead(ASYNC, 0, 0) // EOF
|
| };
|
|
|
| HostPortPair host_port_pair("www.google.com", 80);
|
| - SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
|
| - PRIVACY_MODE_DISABLED);
|
| + SpdySessionKey key(
|
| + host_port_pair, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
|
| InitSession(reads, arraysize(reads), NULL, 0, key);
|
|
|
| SpdyHttpStream stream(session_, false);
|
| @@ -158,17 +160,16 @@ TEST_P(SpdyHttpStreamTest, SendRequest) {
|
| scoped_ptr<SpdyFrame> req(
|
| spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true));
|
| MockWrite writes[] = {
|
| - CreateMockWrite(*req.get(), 1),
|
| + CreateMockWrite(*req.get(), 1),
|
| };
|
| scoped_ptr<SpdyFrame> resp(spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
|
| MockRead reads[] = {
|
| - CreateMockRead(*resp, 2),
|
| - MockRead(SYNCHRONOUS, 0, 3) // EOF
|
| + CreateMockRead(*resp, 2), MockRead(SYNCHRONOUS, 0, 3) // EOF
|
| };
|
|
|
| HostPortPair host_port_pair("www.google.com", 80);
|
| - SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
|
| - PRIVACY_MODE_DISABLED);
|
| + SpdySessionKey key(
|
| + host_port_pair, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
|
| InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
|
|
|
| HttpRequestInfo request;
|
| @@ -183,14 +184,13 @@ TEST_P(SpdyHttpStreamTest, SendRequest) {
|
| LoadTimingInfo load_timing_info;
|
| EXPECT_FALSE(http_stream->GetLoadTimingInfo(&load_timing_info));
|
|
|
| - ASSERT_EQ(
|
| - OK,
|
| - http_stream->InitializeStream(&request, DEFAULT_PRIORITY,
|
| - net_log, CompletionCallback()));
|
| + ASSERT_EQ(OK,
|
| + http_stream->InitializeStream(
|
| + &request, DEFAULT_PRIORITY, net_log, CompletionCallback()));
|
| EXPECT_FALSE(http_stream->GetLoadTimingInfo(&load_timing_info));
|
|
|
| - EXPECT_EQ(ERR_IO_PENDING, http_stream->SendRequest(headers, &response,
|
| - callback.callback()));
|
| + EXPECT_EQ(ERR_IO_PENDING,
|
| + http_stream->SendRequest(headers, &response, callback.callback()));
|
| EXPECT_TRUE(HasSpdySession(http_session_->spdy_session_pool(), key));
|
| EXPECT_FALSE(http_stream->GetLoadTimingInfo(&load_timing_info));
|
|
|
| @@ -222,31 +222,25 @@ TEST_P(SpdyHttpStreamTest, LoadTimingTwoRequests) {
|
| scoped_ptr<SpdyFrame> req2(
|
| spdy_util_.ConstructSpdyGet(NULL, 0, false, 3, LOWEST, true));
|
| MockWrite writes[] = {
|
| - CreateMockWrite(*req1, 0),
|
| - CreateMockWrite(*req2, 1),
|
| + CreateMockWrite(*req1, 0), CreateMockWrite(*req2, 1),
|
| };
|
| - scoped_ptr<SpdyFrame> resp1(
|
| - spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
|
| + scoped_ptr<SpdyFrame> resp1(spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
|
| scoped_ptr<SpdyFrame> body1(
|
| spdy_util_.ConstructSpdyBodyFrame(1, "", 0, true));
|
| - scoped_ptr<SpdyFrame> resp2(
|
| - spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
|
| + scoped_ptr<SpdyFrame> resp2(spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 3));
|
| scoped_ptr<SpdyFrame> body2(
|
| spdy_util_.ConstructSpdyBodyFrame(3, "", 0, true));
|
| MockRead reads[] = {
|
| - CreateMockRead(*resp1, 2),
|
| - CreateMockRead(*body1, 3),
|
| - CreateMockRead(*resp2, 4),
|
| - CreateMockRead(*body2, 5),
|
| - MockRead(ASYNC, 0, 6) // EOF
|
| + CreateMockRead(*resp1, 2), CreateMockRead(*body1, 3),
|
| + CreateMockRead(*resp2, 4), CreateMockRead(*body2, 5),
|
| + MockRead(ASYNC, 0, 6) // EOF
|
| };
|
|
|
| HostPortPair host_port_pair("www.google.com", 80);
|
| - SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
|
| - PRIVACY_MODE_DISABLED);
|
| - InitSessionDeterministic(reads, arraysize(reads),
|
| - writes, arraysize(writes),
|
| - key);
|
| + SpdySessionKey key(
|
| + host_port_pair, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
|
| + InitSessionDeterministic(
|
| + reads, arraysize(reads), writes, arraysize(writes), key);
|
|
|
| HttpRequestInfo request1;
|
| request1.method = "GET";
|
| @@ -265,12 +259,13 @@ TEST_P(SpdyHttpStreamTest, LoadTimingTwoRequests) {
|
| scoped_ptr<SpdyHttpStream> http_stream2(new SpdyHttpStream(session_, true));
|
|
|
| // First write.
|
| - ASSERT_EQ(OK,
|
| - http_stream1->InitializeStream(&request1, DEFAULT_PRIORITY,
|
| - BoundNetLog(),
|
| - CompletionCallback()));
|
| - EXPECT_EQ(ERR_IO_PENDING, http_stream1->SendRequest(headers1, &response1,
|
| - callback1.callback()));
|
| + ASSERT_EQ(
|
| + OK,
|
| + http_stream1->InitializeStream(
|
| + &request1, DEFAULT_PRIORITY, BoundNetLog(), CompletionCallback()));
|
| + EXPECT_EQ(
|
| + ERR_IO_PENDING,
|
| + http_stream1->SendRequest(headers1, &response1, callback1.callback()));
|
| EXPECT_TRUE(HasSpdySession(http_session_->spdy_session_pool(), key));
|
|
|
| deterministic_data()->RunFor(1);
|
| @@ -283,12 +278,13 @@ TEST_P(SpdyHttpStreamTest, LoadTimingTwoRequests) {
|
| EXPECT_FALSE(http_stream2->GetLoadTimingInfo(&load_timing_info2));
|
|
|
| // Second write.
|
| - ASSERT_EQ(OK,
|
| - http_stream2->InitializeStream(&request2, DEFAULT_PRIORITY,
|
| - BoundNetLog(),
|
| - CompletionCallback()));
|
| - EXPECT_EQ(ERR_IO_PENDING, http_stream2->SendRequest(headers2, &response2,
|
| - callback2.callback()));
|
| + ASSERT_EQ(
|
| + OK,
|
| + http_stream2->InitializeStream(
|
| + &request2, DEFAULT_PRIORITY, BoundNetLog(), CompletionCallback()));
|
| + EXPECT_EQ(
|
| + ERR_IO_PENDING,
|
| + http_stream2->SendRequest(headers2, &response2, callback2.callback()));
|
| EXPECT_TRUE(HasSpdySession(http_session_->spdy_session_pool(), key));
|
|
|
| deterministic_data()->RunFor(1);
|
| @@ -315,8 +311,7 @@ TEST_P(SpdyHttpStreamTest, LoadTimingTwoRequests) {
|
| TEST_P(SpdyHttpStreamTest, SendChunkedPost) {
|
| BufferedSpdyFramer framer(spdy_util_.spdy_version(), false);
|
|
|
| - scoped_ptr<SpdyFrame> req(
|
| - spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
|
| + scoped_ptr<SpdyFrame> req(spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
|
| scoped_ptr<SpdyFrame> body(
|
| framer.CreateDataFrame(1, kUploadData, kUploadDataSize, DATA_FLAG_FIN));
|
| std::vector<MockWrite> writes;
|
| @@ -331,18 +326,20 @@ TEST_P(SpdyHttpStreamTest, SendChunkedPost) {
|
| reads.push_back(MockRead(SYNCHRONOUS, 0, seq++)); // EOF
|
|
|
| HostPortPair host_port_pair("www.google.com", 80);
|
| - SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
|
| - PRIVACY_MODE_DISABLED);
|
| - InitSession(vector_as_array(&reads), reads.size(),
|
| - vector_as_array(&writes), writes.size(),
|
| + SpdySessionKey key(
|
| + host_port_pair, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
|
| + InitSession(vector_as_array(&reads),
|
| + reads.size(),
|
| + vector_as_array(&writes),
|
| + writes.size(),
|
| key);
|
| EXPECT_EQ(spdy_util_.spdy_version(), session_->GetProtocolVersion());
|
|
|
| UploadDataStream upload_stream(UploadDataStream::CHUNKED, 0);
|
| - const int kFirstChunkSize = kUploadDataSize/2;
|
| + const int kFirstChunkSize = kUploadDataSize / 2;
|
| upload_stream.AppendChunk(kUploadData, kFirstChunkSize, false);
|
| - upload_stream.AppendChunk(kUploadData + kFirstChunkSize,
|
| - kUploadDataSize - kFirstChunkSize, true);
|
| + upload_stream.AppendChunk(
|
| + kUploadData + kFirstChunkSize, kUploadDataSize - kFirstChunkSize, true);
|
|
|
| HttpRequestInfo request;
|
| request.method = "POST";
|
| @@ -356,13 +353,12 @@ TEST_P(SpdyHttpStreamTest, SendChunkedPost) {
|
| HttpRequestHeaders headers;
|
| BoundNetLog net_log;
|
| SpdyHttpStream http_stream(session_, true);
|
| - ASSERT_EQ(
|
| - OK,
|
| - http_stream.InitializeStream(&request, DEFAULT_PRIORITY,
|
| - net_log, CompletionCallback()));
|
| + ASSERT_EQ(OK,
|
| + http_stream.InitializeStream(
|
| + &request, DEFAULT_PRIORITY, net_log, CompletionCallback()));
|
|
|
| - EXPECT_EQ(ERR_IO_PENDING, http_stream.SendRequest(
|
| - headers, &response, callback.callback()));
|
| + EXPECT_EQ(ERR_IO_PENDING,
|
| + http_stream.SendRequest(headers, &response, callback.callback()));
|
| EXPECT_TRUE(HasSpdySession(http_session_->spdy_session_pool(), key));
|
|
|
| // This results in writing the post body and reading the response headers.
|
| @@ -384,34 +380,29 @@ TEST_P(SpdyHttpStreamTest, SendChunkedPost) {
|
| // chunk becomes available while a write is pending.
|
| TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPost) {
|
| const char kUploadData1[] = "12345678";
|
| - const int kUploadData1Size = arraysize(kUploadData1)-1;
|
| + const int kUploadData1Size = arraysize(kUploadData1) - 1;
|
| scoped_ptr<SpdyFrame> req(spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
|
| scoped_ptr<SpdyFrame> chunk1(spdy_util_.ConstructSpdyBodyFrame(1, false));
|
| - scoped_ptr<SpdyFrame> chunk2(
|
| - spdy_util_.ConstructSpdyBodyFrame(
|
| - 1, kUploadData1, kUploadData1Size, false));
|
| + scoped_ptr<SpdyFrame> chunk2(spdy_util_.ConstructSpdyBodyFrame(
|
| + 1, kUploadData1, kUploadData1Size, false));
|
| scoped_ptr<SpdyFrame> chunk3(spdy_util_.ConstructSpdyBodyFrame(1, true));
|
| MockWrite writes[] = {
|
| - CreateMockWrite(*req.get(), 0),
|
| - CreateMockWrite(*chunk1, 1), // POST upload frames
|
| - CreateMockWrite(*chunk2, 2),
|
| - CreateMockWrite(*chunk3, 3),
|
| + CreateMockWrite(*req.get(), 0),
|
| + CreateMockWrite(*chunk1, 1), // POST upload frames
|
| + CreateMockWrite(*chunk2, 2), CreateMockWrite(*chunk3, 3),
|
| };
|
| scoped_ptr<SpdyFrame> resp(spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
|
| MockRead reads[] = {
|
| - CreateMockRead(*resp, 4),
|
| - CreateMockRead(*chunk1, 5),
|
| - CreateMockRead(*chunk2, 6),
|
| - CreateMockRead(*chunk3, 7),
|
| - MockRead(ASYNC, 0, 8) // EOF
|
| + CreateMockRead(*resp, 4), CreateMockRead(*chunk1, 5),
|
| + CreateMockRead(*chunk2, 6), CreateMockRead(*chunk3, 7),
|
| + MockRead(ASYNC, 0, 8) // EOF
|
| };
|
|
|
| HostPortPair host_port_pair("www.google.com", 80);
|
| - SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
|
| - PRIVACY_MODE_DISABLED);
|
| - InitSessionDeterministic(reads, arraysize(reads),
|
| - writes, arraysize(writes),
|
| - key);
|
| + SpdySessionKey key(
|
| + host_port_pair, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
|
| + InitSessionDeterministic(
|
| + reads, arraysize(reads), writes, arraysize(writes), key);
|
|
|
| UploadDataStream upload_stream(UploadDataStream::CHUNKED, 0);
|
|
|
| @@ -425,16 +416,17 @@ TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPost) {
|
|
|
| BoundNetLog net_log;
|
| scoped_ptr<SpdyHttpStream> http_stream(new SpdyHttpStream(session_, true));
|
| - ASSERT_EQ(OK, http_stream->InitializeStream(&request, DEFAULT_PRIORITY,
|
| - net_log, CompletionCallback()));
|
| + ASSERT_EQ(OK,
|
| + http_stream->InitializeStream(
|
| + &request, DEFAULT_PRIORITY, net_log, CompletionCallback()));
|
|
|
| TestCompletionCallback callback;
|
| HttpRequestHeaders headers;
|
| HttpResponseInfo response;
|
| // This will attempt to Write() the initial request and headers, which will
|
| // complete asynchronously.
|
| - EXPECT_EQ(ERR_IO_PENDING, http_stream->SendRequest(headers, &response,
|
| - callback.callback()));
|
| + EXPECT_EQ(ERR_IO_PENDING,
|
| + http_stream->SendRequest(headers, &response, callback.callback()));
|
| EXPECT_TRUE(HasSpdySession(http_session_->spdy_session_pool(), key));
|
|
|
| // Complete the initial request write and the first chunk.
|
| @@ -487,22 +479,21 @@ TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPost) {
|
|
|
| // Test case for bug: http://code.google.com/p/chromium/issues/detail?id=50058
|
| TEST_P(SpdyHttpStreamTest, SpdyURLTest) {
|
| - const char * const full_url = "http://www.google.com/foo?query=what#anchor";
|
| - const char * const base_url = "http://www.google.com/foo?query=what";
|
| + const char* const full_url = "http://www.google.com/foo?query=what#anchor";
|
| + const char* const base_url = "http://www.google.com/foo?query=what";
|
| scoped_ptr<SpdyFrame> req(
|
| spdy_util_.ConstructSpdyGet(base_url, false, 1, LOWEST));
|
| MockWrite writes[] = {
|
| - CreateMockWrite(*req.get(), 1),
|
| + CreateMockWrite(*req.get(), 1),
|
| };
|
| scoped_ptr<SpdyFrame> resp(spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1));
|
| MockRead reads[] = {
|
| - CreateMockRead(*resp, 2),
|
| - MockRead(SYNCHRONOUS, 0, 3) // EOF
|
| + CreateMockRead(*resp, 2), MockRead(SYNCHRONOUS, 0, 3) // EOF
|
| };
|
|
|
| HostPortPair host_port_pair("www.google.com", 80);
|
| - SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
|
| - PRIVACY_MODE_DISABLED);
|
| + SpdySessionKey key(
|
| + host_port_pair, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
|
| InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
|
|
|
| HttpRequestInfo request;
|
| @@ -517,8 +508,8 @@ TEST_P(SpdyHttpStreamTest, SpdyURLTest) {
|
| http_stream->InitializeStream(
|
| &request, DEFAULT_PRIORITY, net_log, CompletionCallback()));
|
|
|
| - EXPECT_EQ(ERR_IO_PENDING, http_stream->SendRequest(headers, &response,
|
| - callback.callback()));
|
| + EXPECT_EQ(ERR_IO_PENDING,
|
| + http_stream->SendRequest(headers, &response, callback.callback()));
|
|
|
| EXPECT_EQ(base_url, http_stream->stream()->GetUrlFromHeaders().spec());
|
|
|
| @@ -546,26 +537,22 @@ TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPostWithWindowUpdate) {
|
| scoped_ptr<SpdyFrame> req(spdy_util_.ConstructChunkedSpdyPost(NULL, 0));
|
| scoped_ptr<SpdyFrame> chunk1(spdy_util_.ConstructSpdyBodyFrame(1, true));
|
| MockWrite writes[] = {
|
| - CreateMockWrite(*req.get(), 0),
|
| - CreateMockWrite(*chunk1, 1),
|
| + CreateMockWrite(*req.get(), 0), CreateMockWrite(*chunk1, 1),
|
| };
|
| scoped_ptr<SpdyFrame> resp(spdy_util_.ConstructSpdyPostSynReply(NULL, 0));
|
| scoped_ptr<SpdyFrame> window_update(
|
| spdy_util_.ConstructSpdyWindowUpdate(1, kUploadDataSize));
|
| MockRead reads[] = {
|
| - CreateMockRead(*window_update, 2),
|
| - CreateMockRead(*resp, 3),
|
| - CreateMockRead(*chunk1, 4),
|
| - MockRead(ASYNC, 0, 5) // EOF
|
| + CreateMockRead(*window_update, 2), CreateMockRead(*resp, 3),
|
| + CreateMockRead(*chunk1, 4), MockRead(ASYNC, 0, 5) // EOF
|
| };
|
|
|
| HostPortPair host_port_pair("www.google.com", 80);
|
| - SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
|
| - PRIVACY_MODE_DISABLED);
|
| + SpdySessionKey key(
|
| + host_port_pair, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
|
|
|
| - InitSessionDeterministic(reads, arraysize(reads),
|
| - writes, arraysize(writes),
|
| - key);
|
| + InitSessionDeterministic(
|
| + reads, arraysize(reads), writes, arraysize(writes), key);
|
|
|
| UploadDataStream upload_stream(UploadDataStream::CHUNKED, 0);
|
|
|
| @@ -579,16 +566,17 @@ TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPostWithWindowUpdate) {
|
|
|
| BoundNetLog net_log;
|
| scoped_ptr<SpdyHttpStream> http_stream(new SpdyHttpStream(session_, true));
|
| - ASSERT_EQ(OK, http_stream->InitializeStream(&request, DEFAULT_PRIORITY,
|
| - net_log, CompletionCallback()));
|
| + ASSERT_EQ(OK,
|
| + http_stream->InitializeStream(
|
| + &request, DEFAULT_PRIORITY, net_log, CompletionCallback()));
|
|
|
| HttpRequestHeaders headers;
|
| HttpResponseInfo response;
|
| // This will attempt to Write() the initial request and headers, which will
|
| // complete asynchronously.
|
| TestCompletionCallback callback;
|
| - EXPECT_EQ(ERR_IO_PENDING, http_stream->SendRequest(headers, &response,
|
| - callback.callback()));
|
| + EXPECT_EQ(ERR_IO_PENDING,
|
| + http_stream->SendRequest(headers, &response, callback.callback()));
|
| EXPECT_TRUE(HasSpdySession(http_session_->spdy_session_pool(), key));
|
|
|
| // Complete the initial request write and first chunk.
|
|
|