| 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/host_cache.h" | 7 #include "net/base/host_cache.h" |
| 8 #include "net/base/ip_endpoint.h" | 8 #include "net/base/ip_endpoint.h" |
| 9 #include "net/base/net_log_unittest.h" | 9 #include "net/base/net_log_unittest.h" |
| 10 #include "net/spdy/spdy_io_buffer.h" | 10 #include "net/spdy/spdy_io_buffer.h" |
| (...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 session_deps.host_resolver->GetHostCache()->clear(); | 1083 session_deps.host_resolver->GetHostCache()->clear(); |
| 1084 EXPECT_TRUE(spdy_session_pool->HasSession(test_hosts[1].pair)); | 1084 EXPECT_TRUE(spdy_session_pool->HasSession(test_hosts[1].pair)); |
| 1085 | 1085 |
| 1086 // Cleanup the sessions. | 1086 // Cleanup the sessions. |
| 1087 if (!clean_via_close_current_sessions) { | 1087 if (!clean_via_close_current_sessions) { |
| 1088 spdy_session_pool->Remove(session); | 1088 spdy_session_pool->Remove(session); |
| 1089 session = NULL; | 1089 session = NULL; |
| 1090 spdy_session_pool->Remove(session2); | 1090 spdy_session_pool->Remove(session2); |
| 1091 session2 = NULL; | 1091 session2 = NULL; |
| 1092 } else { | 1092 } else { |
| 1093 spdy_session_pool->CloseCurrentSessions(); | 1093 spdy_session_pool->CloseCurrentSessions(net::ERR_ABORTED); |
| 1094 } | 1094 } |
| 1095 | 1095 |
| 1096 // Verify that the map is all cleaned up. | 1096 // Verify that the map is all cleaned up. |
| 1097 EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[0].pair)); | 1097 EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[0].pair)); |
| 1098 EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[1].pair)); | 1098 EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[1].pair)); |
| 1099 EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[2].pair)); | 1099 EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[2].pair)); |
| 1100 } | 1100 } |
| 1101 | 1101 |
| 1102 } // namespace | 1102 } // namespace |
| 1103 | 1103 |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 session->CloseSessionOnError(ERR_ABORTED, true, ""); | 1580 session->CloseSessionOnError(ERR_ABORTED, true, ""); |
| 1581 | 1581 |
| 1582 EXPECT_TRUE(spdy_stream1->closed()); | 1582 EXPECT_TRUE(spdy_stream1->closed()); |
| 1583 EXPECT_TRUE(spdy_stream2->closed()); | 1583 EXPECT_TRUE(spdy_stream2->closed()); |
| 1584 | 1584 |
| 1585 spdy_stream1 = NULL; | 1585 spdy_stream1 = NULL; |
| 1586 spdy_stream2 = NULL; | 1586 spdy_stream2 = NULL; |
| 1587 } | 1587 } |
| 1588 | 1588 |
| 1589 } // namespace net | 1589 } // namespace net |
| OLD | NEW |