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

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

Issue 11464028: Introduce ERR_NETWORK_CHANGED and allow URLFetcher to automatically retry on that error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed nits Created 8 years 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
« no previous file with comments | « net/spdy/spdy_session_spdy2_unittest.cc ('k') | net/url_request/test_url_fetcher_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
« no previous file with comments | « net/spdy/spdy_session_spdy2_unittest.cc ('k') | net/url_request/test_url_fetcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698