OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <math.h> // ceil | 7 #include <math.h> // ceil |
8 #include <stdarg.h> | 8 #include <stdarg.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } | 246 } |
247 | 247 |
248 struct SimpleGetHelperResult { | 248 struct SimpleGetHelperResult { |
249 int rv; | 249 int rv; |
250 std::string status_line; | 250 std::string status_line; |
251 std::string response_data; | 251 std::string response_data; |
252 int64 totalReceivedBytes; | 252 int64 totalReceivedBytes; |
253 LoadTimingInfo load_timing_info; | 253 LoadTimingInfo load_timing_info; |
254 }; | 254 }; |
255 | 255 |
256 virtual void SetUp() { | 256 void SetUp() override { |
257 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); | 257 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); |
258 base::MessageLoop::current()->RunUntilIdle(); | 258 base::MessageLoop::current()->RunUntilIdle(); |
259 } | 259 } |
260 | 260 |
261 virtual void TearDown() { | 261 void TearDown() override { |
262 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); | 262 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); |
263 base::MessageLoop::current()->RunUntilIdle(); | 263 base::MessageLoop::current()->RunUntilIdle(); |
264 // Empty the current queue. | 264 // Empty the current queue. |
265 base::MessageLoop::current()->RunUntilIdle(); | 265 base::MessageLoop::current()->RunUntilIdle(); |
266 PlatformTest::TearDown(); | 266 PlatformTest::TearDown(); |
267 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); | 267 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); |
268 base::MessageLoop::current()->RunUntilIdle(); | 268 base::MessageLoop::current()->RunUntilIdle(); |
269 } | 269 } |
270 | 270 |
271 // This is the expected return from a current server advertising SPDY. | 271 // This is the expected return from a current server advertising SPDY. |
(...skipping 12905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13177 EXPECT_EQ(ERR_IO_PENDING, rv); | 13177 EXPECT_EQ(ERR_IO_PENDING, rv); |
13178 | 13178 |
13179 rv = callback.WaitForResult(); | 13179 rv = callback.WaitForResult(); |
13180 EXPECT_EQ(ERR_CONNECTION_RESET, rv); | 13180 EXPECT_EQ(ERR_CONNECTION_RESET, rv); |
13181 | 13181 |
13182 const HttpResponseInfo* response = trans->GetResponseInfo(); | 13182 const HttpResponseInfo* response = trans->GetResponseInfo(); |
13183 EXPECT_TRUE(response == NULL); | 13183 EXPECT_TRUE(response == NULL); |
13184 } | 13184 } |
13185 | 13185 |
13186 } // namespace net | 13186 } // namespace net |
OLD | NEW |