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

Side by Side Diff: net/spdy/spdy_session_spdy2_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_pool.cc ('k') | net/spdy/spdy_session_spdy3_unittest.cc » ('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/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
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
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
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_pool.cc ('k') | net/spdy/spdy_session_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698