| 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 "net/spdy/spdy_session.h" | 5 #include "net/spdy/spdy_session.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 5774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5785 TEST(MapFramerErrorToNetError, MapsValue) { | 5785 TEST(MapFramerErrorToNetError, MapsValue) { |
| 5786 CHECK_EQ(ERR_SPDY_PROTOCOL_ERROR, | 5786 CHECK_EQ(ERR_SPDY_PROTOCOL_ERROR, |
| 5787 MapFramerErrorToNetError(SpdyFramer::SPDY_INVALID_CONTROL_FRAME)); | 5787 MapFramerErrorToNetError(SpdyFramer::SPDY_INVALID_CONTROL_FRAME)); |
| 5788 CHECK_EQ(ERR_SPDY_COMPRESSION_ERROR, | 5788 CHECK_EQ(ERR_SPDY_COMPRESSION_ERROR, |
| 5789 MapFramerErrorToNetError(SpdyFramer::SPDY_COMPRESS_FAILURE)); | 5789 MapFramerErrorToNetError(SpdyFramer::SPDY_COMPRESS_FAILURE)); |
| 5790 CHECK_EQ(ERR_SPDY_COMPRESSION_ERROR, | 5790 CHECK_EQ(ERR_SPDY_COMPRESSION_ERROR, |
| 5791 MapFramerErrorToNetError(SpdyFramer::SPDY_DECOMPRESS_FAILURE)); | 5791 MapFramerErrorToNetError(SpdyFramer::SPDY_DECOMPRESS_FAILURE)); |
| 5792 CHECK_EQ( | 5792 CHECK_EQ( |
| 5793 ERR_SPDY_FRAME_SIZE_ERROR, | 5793 ERR_SPDY_FRAME_SIZE_ERROR, |
| 5794 MapFramerErrorToNetError(SpdyFramer::SPDY_CONTROL_PAYLOAD_TOO_LARGE)); | 5794 MapFramerErrorToNetError(SpdyFramer::SPDY_CONTROL_PAYLOAD_TOO_LARGE)); |
| 5795 CHECK_EQ(ERR_SPDY_FRAME_SIZE_ERROR, |
| 5796 MapFramerErrorToNetError(SpdyFramer::SPDY_OVERSIZED_PAYLOAD)); |
| 5795 } | 5797 } |
| 5796 | 5798 |
| 5797 TEST(MapRstStreamStatusToProtocolError, MapsValues) { | 5799 TEST(MapRstStreamStatusToProtocolError, MapsValues) { |
| 5798 CHECK_EQ(STATUS_CODE_PROTOCOL_ERROR, | 5800 CHECK_EQ(STATUS_CODE_PROTOCOL_ERROR, |
| 5799 MapRstStreamStatusToProtocolError(RST_STREAM_PROTOCOL_ERROR)); | 5801 MapRstStreamStatusToProtocolError(RST_STREAM_PROTOCOL_ERROR)); |
| 5800 CHECK_EQ(STATUS_CODE_FRAME_SIZE_ERROR, | 5802 CHECK_EQ(STATUS_CODE_FRAME_SIZE_ERROR, |
| 5801 MapRstStreamStatusToProtocolError(RST_STREAM_FRAME_SIZE_ERROR)); | 5803 MapRstStreamStatusToProtocolError(RST_STREAM_FRAME_SIZE_ERROR)); |
| 5802 CHECK_EQ(STATUS_CODE_ENHANCE_YOUR_CALM, | 5804 CHECK_EQ(STATUS_CODE_ENHANCE_YOUR_CALM, |
| 5803 MapRstStreamStatusToProtocolError(RST_STREAM_ENHANCE_YOUR_CALM)); | 5805 MapRstStreamStatusToProtocolError(RST_STREAM_ENHANCE_YOUR_CALM)); |
| 5804 CHECK_EQ(STATUS_CODE_INADEQUATE_SECURITY, | 5806 CHECK_EQ(STATUS_CODE_INADEQUATE_SECURITY, |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5997 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), | 5999 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), |
| 5998 "spdy_pooling.pem"); | 6000 "spdy_pooling.pem"); |
| 5999 ssl_info.is_issued_by_known_root = true; | 6001 ssl_info.is_issued_by_known_root = true; |
| 6000 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); | 6002 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); |
| 6001 | 6003 |
| 6002 EXPECT_TRUE(SpdySession::CanPool( | 6004 EXPECT_TRUE(SpdySession::CanPool( |
| 6003 &tss, ssl_info, "www.example.org", "mail.example.org")); | 6005 &tss, ssl_info, "www.example.org", "mail.example.org")); |
| 6004 } | 6006 } |
| 6005 | 6007 |
| 6006 } // namespace net | 6008 } // namespace net |
| OLD | NEW |