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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 4253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4264 // Verify that we consumed all test data. | 4264 // Verify that we consumed all test data. |
4265 helper.VerifyDataConsumed(); | 4265 helper.VerifyDataConsumed(); |
4266 } | 4266 } |
4267 | 4267 |
4268 // Verify the case where we buffer data and cancel the transaction. | 4268 // Verify the case where we buffer data and cancel the transaction. |
4269 TEST_P(SpdyNetworkTransactionTest, BufferedCancelled) { | 4269 TEST_P(SpdyNetworkTransactionTest, BufferedCancelled) { |
4270 BufferedSpdyFramer framer(spdy_util_.spdy_version(), false); | 4270 BufferedSpdyFramer framer(spdy_util_.spdy_version(), false); |
4271 | 4271 |
4272 scoped_ptr<SpdyFrame> req( | 4272 scoped_ptr<SpdyFrame> req( |
4273 spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true)); | 4273 spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true)); |
4274 MockWrite writes[] = { CreateMockWrite(*req) }; | 4274 scoped_ptr<SpdyFrame> rst( |
| 4275 spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL)); |
| 4276 MockWrite writes[] = {CreateMockWrite(*req), CreateMockWrite(*rst)}; |
4275 | 4277 |
4276 // NOTE: We don't FIN the stream. | 4278 // NOTE: We don't FIN the stream. |
4277 scoped_ptr<SpdyFrame> data_frame( | 4279 scoped_ptr<SpdyFrame> data_frame( |
4278 framer.CreateDataFrame(1, "message", 7, DATA_FLAG_NONE)); | 4280 framer.CreateDataFrame(1, "message", 7, DATA_FLAG_NONE)); |
4279 | 4281 |
4280 scoped_ptr<SpdyFrame> resp(spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1)); | 4282 scoped_ptr<SpdyFrame> resp(spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1)); |
4281 MockRead reads[] = { | 4283 MockRead reads[] = { |
4282 CreateMockRead(*resp), | 4284 CreateMockRead(*resp), |
4283 MockRead(ASYNC, ERR_IO_PENDING), // Force a wait | 4285 MockRead(ASYNC, ERR_IO_PENDING), // Force a wait |
4284 CreateMockRead(*data_frame), | 4286 CreateMockRead(*data_frame), |
(...skipping 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6701 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6703 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
6702 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 6704 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
6703 new SSLSocketDataProvider(ASYNC, OK)); | 6705 new SSLSocketDataProvider(ASYNC, OK)); |
6704 // Set to TLS_RSA_WITH_NULL_MD5 | 6706 // Set to TLS_RSA_WITH_NULL_MD5 |
6705 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6707 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
6706 | 6708 |
6707 RunTLSUsageCheckTest(ssl_provider.Pass()); | 6709 RunTLSUsageCheckTest(ssl_provider.Pass()); |
6708 } | 6710 } |
6709 | 6711 |
6710 } // namespace net | 6712 } // namespace net |
OLD | NEW |