| 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 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 HttpServerProperties* test_http_server_properties = | 1122 HttpServerProperties* test_http_server_properties = |
| 1123 spdy_session_pool->http_server_properties(); | 1123 spdy_session_pool->http_server_properties(); |
| 1124 SettingsFlagsAndValue flags_and_value1(SETTINGS_FLAG_PLEASE_PERSIST, 2); | 1124 SettingsFlagsAndValue flags_and_value1(SETTINGS_FLAG_PLEASE_PERSIST, 2); |
| 1125 test_http_server_properties->SetSpdySetting( | 1125 test_http_server_properties->SetSpdySetting( |
| 1126 test_host_port_pair, | 1126 test_host_port_pair, |
| 1127 SETTINGS_MAX_CONCURRENT_STREAMS, | 1127 SETTINGS_MAX_CONCURRENT_STREAMS, |
| 1128 SETTINGS_FLAG_PLEASE_PERSIST, | 1128 SETTINGS_FLAG_PLEASE_PERSIST, |
| 1129 2); | 1129 2); |
| 1130 EXPECT_NE(0u, test_http_server_properties->GetSpdySettings( | 1130 EXPECT_NE(0u, test_http_server_properties->GetSpdySettings( |
| 1131 test_host_port_pair).size()); | 1131 test_host_port_pair).size()); |
| 1132 spdy_session_pool->OnIPAddressChanged(); | 1132 spdy_session_pool->OnNetworkChanged(NetworkChangeNotifier::CONNECTION_NONE); |
| 1133 EXPECT_EQ(0u, test_http_server_properties->GetSpdySettings( | 1133 EXPECT_EQ(0u, test_http_server_properties->GetSpdySettings( |
| 1134 test_host_port_pair).size()); | 1134 test_host_port_pair).size()); |
| 1135 } | 1135 } |
| 1136 | 1136 |
| 1137 TEST_F(SpdySessionSpdy2Test, NeedsCredentials) { | 1137 TEST_F(SpdySessionSpdy2Test, NeedsCredentials) { |
| 1138 SpdySessionDependencies session_deps; | 1138 SpdySessionDependencies session_deps; |
| 1139 | 1139 |
| 1140 MockConnect connect_data(SYNCHRONOUS, OK); | 1140 MockConnect connect_data(SYNCHRONOUS, OK); |
| 1141 MockRead reads[] = { | 1141 MockRead reads[] = { |
| 1142 MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever. | 1142 MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever. |
| (...skipping 437 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 |