| 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 4259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4270 // Verify that we consumed all test data. | 4270 // Verify that we consumed all test data. |
| 4271 helper.VerifyDataConsumed(); | 4271 helper.VerifyDataConsumed(); |
| 4272 } | 4272 } |
| 4273 | 4273 |
| 4274 // Verify the case where we buffer data and cancel the transaction. | 4274 // Verify the case where we buffer data and cancel the transaction. |
| 4275 TEST_P(SpdyNetworkTransactionTest, BufferedCancelled) { | 4275 TEST_P(SpdyNetworkTransactionTest, BufferedCancelled) { |
| 4276 BufferedSpdyFramer framer(spdy_util_.spdy_version(), false); | 4276 BufferedSpdyFramer framer(spdy_util_.spdy_version(), false); |
| 4277 | 4277 |
| 4278 scoped_ptr<SpdyFrame> req( | 4278 scoped_ptr<SpdyFrame> req( |
| 4279 spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true)); | 4279 spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true)); |
| 4280 scoped_ptr<SpdyFrame> rst( | 4280 MockWrite writes[] = { CreateMockWrite(*req) }; |
| 4281 spdy_util_.ConstructSpdyRstStream(1, RST_STREAM_CANCEL)); | |
| 4282 MockWrite writes[] = {CreateMockWrite(*req), CreateMockWrite(*rst)}; | |
| 4283 | 4281 |
| 4284 // NOTE: We don't FIN the stream. | 4282 // NOTE: We don't FIN the stream. |
| 4285 scoped_ptr<SpdyFrame> data_frame( | 4283 scoped_ptr<SpdyFrame> data_frame( |
| 4286 framer.CreateDataFrame(1, "message", 7, DATA_FLAG_NONE)); | 4284 framer.CreateDataFrame(1, "message", 7, DATA_FLAG_NONE)); |
| 4287 | 4285 |
| 4288 scoped_ptr<SpdyFrame> resp(spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1)); | 4286 scoped_ptr<SpdyFrame> resp(spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1)); |
| 4289 MockRead reads[] = { | 4287 MockRead reads[] = { |
| 4290 CreateMockRead(*resp), | 4288 CreateMockRead(*resp), |
| 4291 MockRead(ASYNC, ERR_IO_PENDING), // Force a wait | 4289 MockRead(ASYNC, ERR_IO_PENDING), // Force a wait |
| 4292 CreateMockRead(*data_frame), | 4290 CreateMockRead(*data_frame), |
| (...skipping 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6709 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6707 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
| 6710 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 6708 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
| 6711 new SSLSocketDataProvider(ASYNC, OK)); | 6709 new SSLSocketDataProvider(ASYNC, OK)); |
| 6712 // Set to TLS_RSA_WITH_NULL_MD5 | 6710 // Set to TLS_RSA_WITH_NULL_MD5 |
| 6713 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6711 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
| 6714 | 6712 |
| 6715 RunTLSUsageCheckTest(ssl_provider.Pass()); | 6713 RunTLSUsageCheckTest(ssl_provider.Pass()); |
| 6716 } | 6714 } |
| 6717 | 6715 |
| 6718 } // namespace net | 6716 } // namespace net |
| OLD | NEW |