| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <arpa/inet.h> | |
| 6 #include <resolv.h> | 5 #include <resolv.h> |
| 7 | 6 |
| 7 #include "base/sys_byteorder.h" |
| 8 #include "net/dns/dns_config_service_posix.h" | 8 #include "net/dns/dns_config_service_posix.h" |
| 9 | 9 |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 void CompareConfig(const struct __res_state &res, const DnsConfig& config) { | 16 void CompareConfig(const struct __res_state &res, const DnsConfig& config) { |
| 17 EXPECT_EQ(config.ndots, static_cast<int>(res.ndots)); | 17 EXPECT_EQ(config.ndots, static_cast<int>(res.ndots)); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 CloseResState(&res[i]); | 124 CloseResState(&res[i]); |
| 125 } | 125 } |
| 126 EXPECT_TRUE(config[0].Equals(config[0])); | 126 EXPECT_TRUE(config[0].Equals(config[0])); |
| 127 EXPECT_FALSE(config[0].Equals(config[1])); | 127 EXPECT_FALSE(config[0].Equals(config[1])); |
| 128 EXPECT_FALSE(config[1].Equals(config[0])); | 128 EXPECT_FALSE(config[1].Equals(config[0])); |
| 129 } | 129 } |
| 130 | 130 |
| 131 } // namespace net | 131 } // namespace net |
| 132 | 132 |
| 133 | 133 |
| OLD | NEW |