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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1963 | 1963 |
1964 // Ensure we don't crash while closing the stream (which closes the | 1964 // Ensure we don't crash while closing the stream (which closes the |
1965 // session). | 1965 // session). |
1966 spdy_stream->Cancel(); | 1966 spdy_stream->Cancel(); |
1967 | 1967 |
1968 EXPECT_EQ(NULL, spdy_stream.get()); | 1968 EXPECT_EQ(NULL, spdy_stream.get()); |
1969 EXPECT_TRUE(delegate.StreamIsClosed()); | 1969 EXPECT_TRUE(delegate.StreamIsClosed()); |
1970 EXPECT_TRUE(session == NULL); | 1970 EXPECT_TRUE(session == NULL); |
1971 } | 1971 } |
1972 | 1972 |
1973 TEST_P(SpdySessionTest, VerifyDomainAuthentication) { | 1973 TEST_P(SpdySessionTest, DISABLED_VerifyDomainAuthentication) { |
1974 session_deps_.host_resolver->set_synchronous_mode(true); | 1974 session_deps_.host_resolver->set_synchronous_mode(true); |
1975 | 1975 |
1976 MockConnect connect_data(SYNCHRONOUS, OK); | 1976 MockConnect connect_data(SYNCHRONOUS, OK); |
1977 | 1977 |
1978 // No actual data will be sent. | 1978 // No actual data will be sent. |
1979 MockWrite writes[] = { | 1979 MockWrite writes[] = { |
1980 MockWrite(ASYNC, 0, 1) // EOF | 1980 MockWrite(ASYNC, 0, 1) // EOF |
1981 }; | 1981 }; |
1982 | 1982 |
1983 MockRead reads[] = { | 1983 MockRead reads[] = { |
(...skipping 21 matching lines...) Expand all Loading... |
2005 | 2005 |
2006 base::WeakPtr<SpdySession> session = | 2006 base::WeakPtr<SpdySession> session = |
2007 CreateSecureSpdySession(http_session_, key_, BoundNetLog()); | 2007 CreateSecureSpdySession(http_session_, key_, BoundNetLog()); |
2008 | 2008 |
2009 EXPECT_TRUE(session->VerifyDomainAuthentication("www.example.org")); | 2009 EXPECT_TRUE(session->VerifyDomainAuthentication("www.example.org")); |
2010 EXPECT_TRUE(session->VerifyDomainAuthentication("mail.example.org")); | 2010 EXPECT_TRUE(session->VerifyDomainAuthentication("mail.example.org")); |
2011 EXPECT_TRUE(session->VerifyDomainAuthentication("mail.example.com")); | 2011 EXPECT_TRUE(session->VerifyDomainAuthentication("mail.example.com")); |
2012 EXPECT_FALSE(session->VerifyDomainAuthentication("mail.google.com")); | 2012 EXPECT_FALSE(session->VerifyDomainAuthentication("mail.google.com")); |
2013 } | 2013 } |
2014 | 2014 |
2015 TEST_P(SpdySessionTest, ConnectionPooledWithTlsChannelId) { | 2015 // TODO(rch): re-enable this. |
| 2016 TEST_P(SpdySessionTest, DISABLED_ConnectionPooledWithTlsChannelId) { |
2016 session_deps_.host_resolver->set_synchronous_mode(true); | 2017 session_deps_.host_resolver->set_synchronous_mode(true); |
2017 | 2018 |
2018 MockConnect connect_data(SYNCHRONOUS, OK); | 2019 MockConnect connect_data(SYNCHRONOUS, OK); |
2019 | 2020 |
2020 // No actual data will be sent. | 2021 // No actual data will be sent. |
2021 MockWrite writes[] = { | 2022 MockWrite writes[] = { |
2022 MockWrite(ASYNC, 0, 1) // EOF | 2023 MockWrite(ASYNC, 0, 1) // EOF |
2023 }; | 2024 }; |
2024 | 2025 |
2025 MockRead reads[] = { | 2026 MockRead reads[] = { |
(...skipping 2111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4137 RST_STREAM_PROTOCOL_ERROR)); | 4138 RST_STREAM_PROTOCOL_ERROR)); |
4138 CHECK_EQ(STATUS_CODE_FRAME_SIZE_ERROR, | 4139 CHECK_EQ(STATUS_CODE_FRAME_SIZE_ERROR, |
4139 MapRstStreamStatusToProtocolError( | 4140 MapRstStreamStatusToProtocolError( |
4140 RST_STREAM_FRAME_SIZE_ERROR)); | 4141 RST_STREAM_FRAME_SIZE_ERROR)); |
4141 CHECK_EQ(STATUS_CODE_ENHANCE_YOUR_CALM, | 4142 CHECK_EQ(STATUS_CODE_ENHANCE_YOUR_CALM, |
4142 MapRstStreamStatusToProtocolError( | 4143 MapRstStreamStatusToProtocolError( |
4143 RST_STREAM_ENHANCE_YOUR_CALM)); | 4144 RST_STREAM_ENHANCE_YOUR_CALM)); |
4144 } | 4145 } |
4145 | 4146 |
4146 } // namespace net | 4147 } // namespace net |
OLD | NEW |