| 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 db7a5c40ea1ea9e4a32e2cf48199a4505e43ad93..e93733b0d435974f4b3bae2841dac545509254a7 100644
|
| --- a/net/spdy/spdy_network_transaction_spdy3_unittest.cc
|
| +++ b/net/spdy/spdy_network_transaction_spdy3_unittest.cc
|
| @@ -1715,21 +1715,35 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, PostWithEarlySynReply) {
|
| scoped_ptr<SpdyFrame> stream_reply(ConstructSpdyPostSynReply(NULL, 0));
|
| scoped_ptr<SpdyFrame> stream_body(ConstructSpdyBodyFrame(1, true));
|
| MockRead reads[] = {
|
| - CreateMockRead(*stream_reply, 2),
|
| - CreateMockRead(*stream_body, 3),
|
| - MockRead(SYNCHRONOUS, 0, 0) // EOF
|
| + CreateMockRead(*stream_reply, 1),
|
| + MockRead(ASYNC, 0, 3) // EOF
|
| };
|
|
|
| - DelayedSocketData data(0, reads, arraysize(reads), NULL, 0);
|
| - NormalSpdyTransactionHelper helper(request,
|
| + scoped_ptr<SpdyFrame> req(ConstructSpdyPost(kUploadDataSize, NULL, 0));
|
| + scoped_ptr<SpdyFrame> body(ConstructSpdyBodyFrame(1, true));
|
| + MockRead writes[] = {
|
| + CreateMockWrite(*req, 0),
|
| + CreateMockWrite(*body, 2),
|
| + };
|
| +
|
| + DeterministicSocketData data(reads, arraysize(reads),
|
| + writes, arraysize(writes));
|
| + NormalSpdyTransactionHelper helper(CreatePostRequest(),
|
| BoundNetLog(), GetParam(), NULL);
|
| + helper.SetDeterministic();
|
| helper.RunPreTestSetup();
|
| - helper.AddData(&data);
|
| - helper.RunDefaultTest();
|
| - helper.VerifyDataConsumed();
|
| + helper.AddDeterministicData(&data);
|
| + HttpNetworkTransaction* trans = helper.trans();
|
|
|
| - TransactionHelperResult out = helper.output();
|
| - EXPECT_EQ(ERR_SYN_REPLY_NOT_RECEIVED, out.rv);
|
| + TestCompletionCallback callback;
|
| + int rv = trans->Start(
|
| + &CreatePostRequest(), callback.callback(), BoundNetLog());
|
| + EXPECT_EQ(ERR_IO_PENDING, rv);
|
| +
|
| + data.RunFor(2);
|
| + rv = callback.WaitForResult();
|
| + EXPECT_EQ(ERR_SPDY_PROTOCOL_ERROR, rv);
|
| + data.RunFor(1);
|
| }
|
|
|
| // The client upon cancellation tries to send a RST_STREAM frame. The mock
|
| @@ -6016,10 +6030,11 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, OutOfOrderSynStream) {
|
| // This first request will start to establish the SpdySession.
|
| // Then we will start the second (MEDIUM priority) and then third
|
| // (HIGHEST priority) request in such a way that the third will actually
|
| - // start before the second, causing the second to be re-numbered.
|
| + // start before the second, causing the second to be numbered differently
|
| + // than they order they were created.
|
| scoped_ptr<SpdyFrame> req1(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
|
| - scoped_ptr<SpdyFrame> req2(ConstructSpdyGet(NULL, 0, false, 3, MEDIUM));
|
| - scoped_ptr<SpdyFrame> req3(ConstructSpdyGet(NULL, 0, false, 5, HIGHEST));
|
| + scoped_ptr<SpdyFrame> req2(ConstructSpdyGet(NULL, 0, false, 3, HIGHEST));
|
| + scoped_ptr<SpdyFrame> req3(ConstructSpdyGet(NULL, 0, false, 5, MEDIUM));
|
| MockWrite writes[] = {
|
| CreateMockWrite(*req1, 0),
|
| CreateMockWrite(*req2, 3),
|
|
|