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/base/mapped_host_resolver.h" | 5 #include "net/dns/mapped_host_resolver.h" |
6 | 6 |
7 #include "net/base/address_list.h" | 7 #include "net/base/address_list.h" |
8 #include "net/base/mock_host_resolver.h" | |
9 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
10 #include "net/base/net_log.h" | 9 #include "net/base/net_log.h" |
11 #include "net/base/net_util.h" | 10 #include "net/base/net_util.h" |
12 #include "net/base/test_completion_callback.h" | 11 #include "net/base/test_completion_callback.h" |
| 12 #include "net/dns/mock_host_resolver.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 std::string FirstAddress(const AddressList& address_list) { | 19 std::string FirstAddress(const AddressList& address_list) { |
20 if (address_list.empty()) | 20 if (address_list.empty()) |
21 return ""; | 21 return ""; |
22 return address_list.front().ToString(); | 22 return address_list.front().ToString(); |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 BoundNetLog()); | 210 BoundNetLog()); |
211 EXPECT_EQ(ERR_IO_PENDING, rv); | 211 EXPECT_EQ(ERR_IO_PENDING, rv); |
212 rv = callback2.WaitForResult(); | 212 rv = callback2.WaitForResult(); |
213 EXPECT_EQ(OK, rv); | 213 EXPECT_EQ(OK, rv); |
214 EXPECT_EQ("192.168.1.5:80", FirstAddress(address_list)); | 214 EXPECT_EQ("192.168.1.5:80", FirstAddress(address_list)); |
215 } | 215 } |
216 | 216 |
217 } // namespace | 217 } // namespace |
218 | 218 |
219 } // namespace net | 219 } // namespace net |
OLD | NEW |