| 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/logging.h" | |
| 7 #include "base/string_util.h" | 6 #include "base/string_util.h" |
| 8 #include "base/time.h" | 7 #include "base/time.h" |
| 9 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
| 10 #include "net/base/net_util.h" | 9 #include "net/base/net_util.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 11 |
| 13 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
| 14 #include <ws2tcpip.h> | 13 #include <ws2tcpip.h> |
| 15 #else | 14 #else |
| 16 #include <netdb.h> | 15 #include <netdb.h> |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 } | 883 } |
| 885 } | 884 } |
| 886 | 885 |
| 887 TEST(NetUtilTest, GetMyHostName) { | 886 TEST(NetUtilTest, GetMyHostName) { |
| 888 // We can't check the result of GetMyHostName() directly, since the result | 887 // We can't check the result of GetMyHostName() directly, since the result |
| 889 // will differ across machines. Our goal here is to simply exercise the | 888 // will differ across machines. Our goal here is to simply exercise the |
| 890 // code path, and check that things "look about right". | 889 // code path, and check that things "look about right". |
| 891 std::string my_hostname = net::GetMyHostName(); | 890 std::string my_hostname = net::GetMyHostName(); |
| 892 EXPECT_FALSE(my_hostname.empty()); | 891 EXPECT_FALSE(my_hostname.empty()); |
| 893 } | 892 } |
| OLD | NEW |