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

Side by Side Diff: net/spdy/spdy_network_transaction_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_network_transaction_spdy2_unittest.cc ('k') | net/spdy/spdy_session_pool.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/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 void RunDefaultTest() { 164 void RunDefaultTest() {
165 output_.rv = trans_->Start(&request_, callback.callback(), log_); 165 output_.rv = trans_->Start(&request_, callback.callback(), log_);
166 166
167 // We expect an IO Pending or some sort of error. 167 // We expect an IO Pending or some sort of error.
168 EXPECT_LT(output_.rv, 0); 168 EXPECT_LT(output_.rv, 0);
169 if (output_.rv != ERR_IO_PENDING) 169 if (output_.rv != ERR_IO_PENDING)
170 return; 170 return;
171 171
172 output_.rv = callback.WaitForResult(); 172 output_.rv = callback.WaitForResult();
173 if (output_.rv != OK) { 173 if (output_.rv != OK) {
174 session_->spdy_session_pool()->CloseCurrentSessions(); 174 session_->spdy_session_pool()->CloseCurrentSessions(net::ERR_ABORTED);
175 return; 175 return;
176 } 176 }
177 177
178 // Verify responses. 178 // Verify responses.
179 const HttpResponseInfo* response = trans_->GetResponseInfo(); 179 const HttpResponseInfo* response = trans_->GetResponseInfo();
180 ASSERT_TRUE(response != NULL); 180 ASSERT_TRUE(response != NULL);
181 ASSERT_TRUE(response->headers != NULL); 181 ASSERT_TRUE(response->headers != NULL);
182 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); 182 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine());
183 EXPECT_EQ(spdy_enabled_, response->was_fetched_via_spdy); 183 EXPECT_EQ(spdy_enabled_, response->was_fetched_via_spdy);
184 if (test_type_ == SPDYNPN && spdy_enabled_) { 184 if (test_type_ == SPDYNPN && spdy_enabled_) {
(...skipping 6170 matching lines...) Expand 10 before | Expand all | Expand 10 after
6355 // And now we can allow everything else to run to completion. 6355 // And now we can allow everything else to run to completion.
6356 data.SetStop(10); 6356 data.SetStop(10);
6357 data.Run(); 6357 data.Run();
6358 EXPECT_EQ(OK, callback2.WaitForResult()); 6358 EXPECT_EQ(OK, callback2.WaitForResult());
6359 EXPECT_EQ(OK, callback3.WaitForResult()); 6359 EXPECT_EQ(OK, callback3.WaitForResult());
6360 6360
6361 helper.VerifyDataConsumed(); 6361 helper.VerifyDataConsumed();
6362 } 6362 }
6363 6363
6364 } // namespace net 6364 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_network_transaction_spdy2_unittest.cc ('k') | net/spdy/spdy_session_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698