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 "base/platform_test.h" | |
6 #include "net/base/scoped_host_mapper.h" | 5 #include "net/base/scoped_host_mapper.h" |
7 #include "net/http/http_network_layer.h" | 6 #include "net/http/http_network_layer.h" |
8 #include "net/http/http_transaction_unittest.h" | 7 #include "net/http/http_transaction_unittest.h" |
9 #include "net/proxy/proxy_service.h" | 8 #include "net/proxy/proxy_service.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "testing/platform_test.h" |
11 | 11 |
12 class HttpNetworkLayerTest : public PlatformTest { | 12 class HttpNetworkLayerTest : public PlatformTest { |
13 public: | 13 public: |
14 HttpNetworkLayerTest() { | 14 HttpNetworkLayerTest() { |
15 // TODO(darin): kill this exception once we have a way to test out the | 15 // TODO(darin): kill this exception once we have a way to test out the |
16 // HttpNetworkLayer class using loopback connections. | 16 // HttpNetworkLayer class using loopback connections. |
17 host_mapper_.AddRule("www.google.com", "www.google.com"); | 17 host_mapper_.AddRule("www.google.com", "www.google.com"); |
18 } | 18 } |
19 private: | 19 private: |
20 net::ScopedHostMapper host_mapper_; | 20 net::ScopedHostMapper host_mapper_; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 int rv = trans->Start(&request_info, &callback); | 59 int rv = trans->Start(&request_info, &callback); |
60 if (rv == net::ERR_IO_PENDING) | 60 if (rv == net::ERR_IO_PENDING) |
61 rv = callback.WaitForResult(); | 61 rv = callback.WaitForResult(); |
62 EXPECT_EQ(net::OK, rv); | 62 EXPECT_EQ(net::OK, rv); |
63 | 63 |
64 std::string contents; | 64 std::string contents; |
65 rv = ReadTransaction(trans.get(), &contents); | 65 rv = ReadTransaction(trans.get(), &contents); |
66 EXPECT_EQ(net::OK, rv); | 66 EXPECT_EQ(net::OK, rv); |
67 } | 67 } |
68 | 68 |
OLD | NEW |