| 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 "net/base/cert_test_util.h" | 7 #include "net/base/cert_test_util.h" |
| 8 #include "net/base/host_cache.h" | 8 #include "net/base/host_cache.h" |
| 9 #include "net/base/ip_endpoint.h" | 9 #include "net/base/ip_endpoint.h" |
| 10 #include "net/base/net_log_unittest.h" | 10 #include "net/base/net_log_unittest.h" |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1095 session_deps.host_resolver->GetHostCache()->clear(); | 1095 session_deps.host_resolver->GetHostCache()->clear(); |
| 1096 EXPECT_TRUE(spdy_session_pool->HasSession(test_hosts[1].pair)); | 1096 EXPECT_TRUE(spdy_session_pool->HasSession(test_hosts[1].pair)); |
| 1097 | 1097 |
| 1098 // Cleanup the sessions. | 1098 // Cleanup the sessions. |
| 1099 if (!clean_via_close_current_sessions) { | 1099 if (!clean_via_close_current_sessions) { |
| 1100 spdy_session_pool->Remove(session); | 1100 spdy_session_pool->Remove(session); |
| 1101 session = NULL; | 1101 session = NULL; |
| 1102 spdy_session_pool->Remove(session2); | 1102 spdy_session_pool->Remove(session2); |
| 1103 session2 = NULL; | 1103 session2 = NULL; |
| 1104 } else { | 1104 } else { |
| 1105 spdy_session_pool->CloseCurrentSessions(); | 1105 spdy_session_pool->CloseCurrentSessions(net::ERR_ABORTED); |
| 1106 } | 1106 } |
| 1107 | 1107 |
| 1108 // Verify that the map is all cleaned up. | 1108 // Verify that the map is all cleaned up. |
| 1109 EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[0].pair)); | 1109 EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[0].pair)); |
| 1110 EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[1].pair)); | 1110 EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[1].pair)); |
| 1111 EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[2].pair)); | 1111 EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[2].pair)); |
| 1112 } | 1112 } |
| 1113 | 1113 |
| 1114 } // namespace | 1114 } // namespace |
| 1115 | 1115 |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1914 BoundNetLog())); | 1914 BoundNetLog())); |
| 1915 | 1915 |
| 1916 EXPECT_EQ(OK, session->InitializeWithSocket(connection.release(), false, OK)); | 1916 EXPECT_EQ(OK, session->InitializeWithSocket(connection.release(), false, OK)); |
| 1917 EXPECT_TRUE(session->VerifyDomainAuthentication("www.example.org")); | 1917 EXPECT_TRUE(session->VerifyDomainAuthentication("www.example.org")); |
| 1918 EXPECT_TRUE(session->VerifyDomainAuthentication("mail.example.org")); | 1918 EXPECT_TRUE(session->VerifyDomainAuthentication("mail.example.org")); |
| 1919 EXPECT_FALSE(session->VerifyDomainAuthentication("mail.example.com")); | 1919 EXPECT_FALSE(session->VerifyDomainAuthentication("mail.example.com")); |
| 1920 EXPECT_FALSE(session->VerifyDomainAuthentication("mail.google.com")); | 1920 EXPECT_FALSE(session->VerifyDomainAuthentication("mail.google.com")); |
| 1921 } | 1921 } |
| 1922 | 1922 |
| 1923 } // namespace net | 1923 } // namespace net |
| OLD | NEW |