Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: net/spdy/spdy_session_spdy3_unittest.cc

Issue 11620007: Switch from OnIPAddressChanged and OnConnectionTypeChange to OnNetworkChanged Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698