| 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); | 322 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
| 323 scoped_ptr<HttpTransaction> trans( | 323 scoped_ptr<HttpTransaction> trans( |
| 324 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); | 324 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
| 325 | 325 |
| 326 for (size_t i = 0; i < data_count; ++i) { | 326 for (size_t i = 0; i < data_count; ++i) { |
| 327 session_deps_.socket_factory->AddSocketDataProvider(data[i]); | 327 session_deps_.socket_factory->AddSocketDataProvider(data[i]); |
| 328 } | 328 } |
| 329 | 329 |
| 330 TestCompletionCallback callback; | 330 TestCompletionCallback callback; |
| 331 | 331 |
| 332 EXPECT_TRUE(log.bound().IsLogging()); | 332 EXPECT_TRUE(log.bound().GetCaptureMode().enabled()); |
| 333 int rv = trans->Start(&request, callback.callback(), log.bound()); | 333 int rv = trans->Start(&request, callback.callback(), log.bound()); |
| 334 EXPECT_EQ(ERR_IO_PENDING, rv); | 334 EXPECT_EQ(ERR_IO_PENDING, rv); |
| 335 | 335 |
| 336 out.rv = callback.WaitForResult(); | 336 out.rv = callback.WaitForResult(); |
| 337 | 337 |
| 338 // Even in the failure cases that use this function, connections are always | 338 // Even in the failure cases that use this function, connections are always |
| 339 // successfully established before the error. | 339 // successfully established before the error. |
| 340 EXPECT_TRUE(trans->GetLoadTimingInfo(&out.load_timing_info)); | 340 EXPECT_TRUE(trans->GetLoadTimingInfo(&out.load_timing_info)); |
| 341 TestLoadTimingNotReused(out.load_timing_info, CONNECT_TIMING_HAS_DNS_TIMES); | 341 TestLoadTimingNotReused(out.load_timing_info, CONNECT_TIMING_HAS_DNS_TIMES); |
| 342 | 342 |
| (...skipping 13546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13889 ASSERT_TRUE(response); | 13889 ASSERT_TRUE(response); |
| 13890 ASSERT_TRUE(response->headers.get()); | 13890 ASSERT_TRUE(response->headers.get()); |
| 13891 | 13891 |
| 13892 EXPECT_EQ(101, response->headers->response_code()); | 13892 EXPECT_EQ(101, response->headers->response_code()); |
| 13893 | 13893 |
| 13894 trans.reset(); | 13894 trans.reset(); |
| 13895 session->CloseAllConnections(); | 13895 session->CloseAllConnections(); |
| 13896 } | 13896 } |
| 13897 | 13897 |
| 13898 } // namespace net | 13898 } // namespace net |
| OLD | NEW |