| 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 3593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3604 helper.RunToCompletion(&data); | 3604 helper.RunToCompletion(&data); |
| 3605 TransactionHelperResult out = helper.output(); | 3605 TransactionHelperResult out = helper.output(); |
| 3606 EXPECT_EQ(ERR_SPDY_COMPRESSION_ERROR, out.rv); | 3606 EXPECT_EQ(ERR_SPDY_COMPRESSION_ERROR, out.rv); |
| 3607 } | 3607 } |
| 3608 | 3608 |
| 3609 TEST_P(SpdyNetworkTransactionTest, GoAwayOnFrameSizeError) { | 3609 TEST_P(SpdyNetworkTransactionTest, GoAwayOnFrameSizeError) { |
| 3610 std::unique_ptr<SpdySerializedFrame> req( | 3610 std::unique_ptr<SpdySerializedFrame> req( |
| 3611 spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true)); | 3611 spdy_util_.ConstructSpdyGet(nullptr, 0, 1, LOWEST, true)); |
| 3612 std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway( | 3612 std::unique_ptr<SpdySerializedFrame> goaway(spdy_util_.ConstructSpdyGoAway( |
| 3613 0, GOAWAY_FRAME_SIZE_ERROR, | 3613 0, GOAWAY_FRAME_SIZE_ERROR, |
| 3614 "Framer error: 15 (INVALID_CONTROL_FRAME_SIZE).")); | 3614 "Framer error: 14 (INVALID_CONTROL_FRAME_SIZE).")); |
| 3615 MockWrite writes[] = {CreateMockWrite(*req, 0), CreateMockWrite(*goaway, 2)}; | 3615 MockWrite writes[] = {CreateMockWrite(*req, 0), CreateMockWrite(*goaway, 2)}; |
| 3616 | 3616 |
| 3617 // Read WINDOW_UPDATE with incorrectly-sized payload. | 3617 // Read WINDOW_UPDATE with incorrectly-sized payload. |
| 3618 std::unique_ptr<SpdySerializedFrame> bad_window_update( | 3618 std::unique_ptr<SpdySerializedFrame> bad_window_update( |
| 3619 spdy_util_.ConstructSpdyWindowUpdate(1, 1)); | 3619 spdy_util_.ConstructSpdyWindowUpdate(1, 1)); |
| 3620 test::SetFrameLength(bad_window_update.get(), | 3620 test::SetFrameLength(bad_window_update.get(), |
| 3621 bad_window_update->size() - 1, | 3621 bad_window_update->size() - 1, |
| 3622 spdy_util_.spdy_version()); | 3622 spdy_util_.spdy_version()); |
| 3623 MockRead reads[] = {CreateMockRead(*bad_window_update, 1)}; | 3623 MockRead reads[] = {CreateMockRead(*bad_window_update, 1)}; |
| 3624 | 3624 |
| (...skipping 3632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7257 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 7257 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
| 7258 std::unique_ptr<SSLSocketDataProvider> ssl_provider( | 7258 std::unique_ptr<SSLSocketDataProvider> ssl_provider( |
| 7259 new SSLSocketDataProvider(ASYNC, OK)); | 7259 new SSLSocketDataProvider(ASYNC, OK)); |
| 7260 // Set to TLS_RSA_WITH_NULL_MD5 | 7260 // Set to TLS_RSA_WITH_NULL_MD5 |
| 7261 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 7261 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
| 7262 | 7262 |
| 7263 RunTLSUsageCheckTest(std::move(ssl_provider)); | 7263 RunTLSUsageCheckTest(std::move(ssl_provider)); |
| 7264 } | 7264 } |
| 7265 | 7265 |
| 7266 } // namespace net | 7266 } // namespace net |
| OLD | NEW |