| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <math.h> // ceil | 5 #include <math.h> // ceil |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/platform_test.h" | |
| 9 #include "net/base/client_socket_factory.h" | 8 #include "net/base/client_socket_factory.h" |
| 10 #include "net/base/test_completion_callback.h" | 9 #include "net/base/test_completion_callback.h" |
| 11 #include "net/base/upload_data.h" | 10 #include "net/base/upload_data.h" |
| 12 #include "net/http/http_network_session.h" | 11 #include "net/http/http_network_session.h" |
| 13 #include "net/http/http_network_transaction.h" | 12 #include "net/http/http_network_transaction.h" |
| 14 #include "net/http/http_transaction_unittest.h" | 13 #include "net/http/http_transaction_unittest.h" |
| 15 #include "net/proxy/proxy_resolver_fixed.h" | 14 #include "net/proxy/proxy_resolver_fixed.h" |
| 16 #include "net/proxy/proxy_resolver_null.h" | 15 #include "net/proxy/proxy_resolver_null.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "testing/platform_test.h" |
| 18 | 18 |
| 19 //----------------------------------------------------------------------------- | 19 //----------------------------------------------------------------------------- |
| 20 | 20 |
| 21 | 21 |
| 22 struct MockConnect { | 22 struct MockConnect { |
| 23 // Asynchronous connection success. | 23 // Asynchronous connection success. |
| 24 MockConnect() : async(true), result(net::OK) { } | 24 MockConnect() : async(true), result(net::OK) { } |
| 25 | 25 |
| 26 bool async; | 26 bool async; |
| 27 int result; | 27 int result; |
| (...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1499 | 1499 |
| 1500 rv = callback2.WaitForResult(); | 1500 rv = callback2.WaitForResult(); |
| 1501 EXPECT_EQ(net::OK, rv); | 1501 EXPECT_EQ(net::OK, rv); |
| 1502 | 1502 |
| 1503 response = trans->GetResponseInfo(); | 1503 response = trans->GetResponseInfo(); |
| 1504 EXPECT_FALSE(response == NULL); | 1504 EXPECT_FALSE(response == NULL); |
| 1505 EXPECT_TRUE(response->auth_challenge.get() == NULL); | 1505 EXPECT_TRUE(response->auth_challenge.get() == NULL); |
| 1506 EXPECT_EQ(100, response->headers->GetContentLength()); | 1506 EXPECT_EQ(100, response->headers->GetContentLength()); |
| 1507 } | 1507 } |
| 1508 } | 1508 } |
| OLD | NEW |