OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <cmath> | 5 #include <cmath> |
6 #include <memory> | 6 #include <memory> |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 5356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5367 MockRead(SYNCHRONOUS, ERR_IO_PENDING, writes.size() + reads.size())); | 5367 MockRead(SYNCHRONOUS, ERR_IO_PENDING, writes.size() + reads.size())); |
5368 | 5368 |
5369 writes.push_back( | 5369 writes.push_back( |
5370 CreateMockWrite(session_window_update, writes.size() + reads.size())); | 5370 CreateMockWrite(session_window_update, writes.size() + reads.size())); |
5371 writes.push_back( | 5371 writes.push_back( |
5372 CreateMockWrite(stream_window_update, writes.size() + reads.size())); | 5372 CreateMockWrite(stream_window_update, writes.size() + reads.size())); |
5373 | 5373 |
5374 SequencedSocketData data(reads.data(), reads.size(), writes.data(), | 5374 SequencedSocketData data(reads.data(), reads.size(), writes.data(), |
5375 writes.size()); | 5375 writes.size()); |
5376 | 5376 |
| 5377 auto session_deps = base::MakeUnique<SpdySessionDependencies>(); |
| 5378 session_deps->session_max_recv_window_size = session_max_recv_window_size; |
| 5379 session_deps->stream_max_recv_window_size = stream_max_recv_window_size; |
| 5380 |
5377 NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY, | 5381 NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY, |
5378 NetLogWithSource(), NULL); | 5382 NetLogWithSource(), |
| 5383 std::move(session_deps)); |
5379 helper.AddData(&data); | 5384 helper.AddData(&data); |
5380 helper.RunPreTestSetup(); | 5385 helper.RunPreTestSetup(); |
5381 | 5386 |
5382 SpdySessionPool* spdy_session_pool = helper.session()->spdy_session_pool(); | 5387 SpdySessionPool* spdy_session_pool = helper.session()->spdy_session_pool(); |
5383 SpdySessionPoolPeer pool_peer(spdy_session_pool); | 5388 SpdySessionPoolPeer pool_peer(spdy_session_pool); |
5384 pool_peer.SetEnableSendingInitialData(true); | 5389 pool_peer.SetEnableSendingInitialData(true); |
5385 pool_peer.SetSessionMaxRecvWindowSize(session_max_recv_window_size); | |
5386 pool_peer.SetStreamInitialRecvWindowSize(stream_max_recv_window_size); | |
5387 | 5390 |
5388 HttpNetworkTransaction* trans = helper.trans(); | 5391 HttpNetworkTransaction* trans = helper.trans(); |
5389 TestCompletionCallback callback; | 5392 TestCompletionCallback callback; |
5390 int rv = | 5393 int rv = |
5391 trans->Start(&helper.request(), callback.callback(), NetLogWithSource()); | 5394 trans->Start(&helper.request(), callback.callback(), NetLogWithSource()); |
5392 | 5395 |
5393 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); | 5396 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); |
5394 rv = callback.WaitForResult(); | 5397 rv = callback.WaitForResult(); |
5395 EXPECT_THAT(rv, IsOk()); | 5398 EXPECT_THAT(rv, IsOk()); |
5396 | 5399 |
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6221 TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6224 TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
6222 std::unique_ptr<SSLSocketDataProvider> ssl_provider( | 6225 std::unique_ptr<SSLSocketDataProvider> ssl_provider( |
6223 new SSLSocketDataProvider(ASYNC, OK)); | 6226 new SSLSocketDataProvider(ASYNC, OK)); |
6224 // Set to TLS_RSA_WITH_NULL_MD5 | 6227 // Set to TLS_RSA_WITH_NULL_MD5 |
6225 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6228 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
6226 | 6229 |
6227 RunTLSUsageCheckTest(std::move(ssl_provider)); | 6230 RunTLSUsageCheckTest(std::move(ssl_provider)); |
6228 } | 6231 } |
6229 | 6232 |
6230 } // namespace net | 6233 } // namespace net |
OLD | NEW |