| OLD | NEW |
| 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_layer.h" | 5 #include "net/http/http_network_layer.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "net/cert/mock_cert_verifier.h" | 9 #include "net/cert/mock_cert_verifier.h" |
| 10 #include "net/dns/mock_host_resolver.h" | 10 #include "net/dns/mock_host_resolver.h" |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 "Foo/1.0"); | 388 "Foo/1.0"); |
| 389 request_info.load_flags = LOAD_NORMAL; | 389 request_info.load_flags = LOAD_NORMAL; |
| 390 | 390 |
| 391 scoped_ptr<HttpTransaction> trans; | 391 scoped_ptr<HttpTransaction> trans; |
| 392 int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans); | 392 int rv = factory_->CreateTransaction(DEFAULT_PRIORITY, &trans); |
| 393 EXPECT_EQ(OK, rv); | 393 EXPECT_EQ(OK, rv); |
| 394 | 394 |
| 395 rv = trans->Start(&request_info, callback.callback(), BoundNetLog()); | 395 rv = trans->Start(&request_info, callback.callback(), BoundNetLog()); |
| 396 ASSERT_EQ(ERR_CONNECTION_RESET, callback.GetResult(rv)); | 396 ASSERT_EQ(ERR_CONNECTION_RESET, callback.GetResult(rv)); |
| 397 | 397 |
| 398 // If the response info is null, that means that any consumer won't | 398 // network_accessed is true; the HTTP stack did try to make a connection. |
| 399 // see the network accessed bit set. | 399 EXPECT_TRUE(trans->GetResponseInfo()->network_accessed); |
| 400 EXPECT_EQ(NULL, trans->GetResponseInfo()); | |
| 401 } | 400 } |
| 402 | 401 |
| 403 } // namespace | 402 } // namespace |
| 404 | 403 |
| 405 } // namespace net | 404 } // namespace net |
| OLD | NEW |