| 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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 HttpServerProperties* test_http_server_properties = | 1134 HttpServerProperties* test_http_server_properties = |
| 1135 spdy_session_pool->http_server_properties(); | 1135 spdy_session_pool->http_server_properties(); |
| 1136 SettingsFlagsAndValue flags_and_value1(SETTINGS_FLAG_PLEASE_PERSIST, 2); | 1136 SettingsFlagsAndValue flags_and_value1(SETTINGS_FLAG_PLEASE_PERSIST, 2); |
| 1137 test_http_server_properties->SetSpdySetting( | 1137 test_http_server_properties->SetSpdySetting( |
| 1138 test_host_port_pair, | 1138 test_host_port_pair, |
| 1139 SETTINGS_MAX_CONCURRENT_STREAMS, | 1139 SETTINGS_MAX_CONCURRENT_STREAMS, |
| 1140 SETTINGS_FLAG_PLEASE_PERSIST, | 1140 SETTINGS_FLAG_PLEASE_PERSIST, |
| 1141 2); | 1141 2); |
| 1142 EXPECT_NE(0u, test_http_server_properties->GetSpdySettings( | 1142 EXPECT_NE(0u, test_http_server_properties->GetSpdySettings( |
| 1143 test_host_port_pair).size()); | 1143 test_host_port_pair).size()); |
| 1144 spdy_session_pool->OnIPAddressChanged(); | 1144 spdy_session_pool->OnNetworkChanged(NetworkChangeNotifier::CONNECTION_NONE); |
| 1145 EXPECT_EQ(0u, test_http_server_properties->GetSpdySettings( | 1145 EXPECT_EQ(0u, test_http_server_properties->GetSpdySettings( |
| 1146 test_host_port_pair).size()); | 1146 test_host_port_pair).size()); |
| 1147 } | 1147 } |
| 1148 | 1148 |
| 1149 TEST_F(SpdySessionSpdy3Test, NeedsCredentials) { | 1149 TEST_F(SpdySessionSpdy3Test, NeedsCredentials) { |
| 1150 SpdySessionDependencies session_deps; | 1150 SpdySessionDependencies session_deps; |
| 1151 | 1151 |
| 1152 MockConnect connect_data(SYNCHRONOUS, OK); | 1152 MockConnect connect_data(SYNCHRONOUS, OK); |
| 1153 MockRead reads[] = { | 1153 MockRead reads[] = { |
| 1154 MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever. | 1154 MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever. |
| (...skipping 759 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 |