| Index: net/base/net_util_unittest.cc
|
| diff --git a/net/base/net_util_unittest.cc b/net/base/net_util_unittest.cc
|
| index 833375cfcf19ab4e2e4f48c16657febdeb918be7..0d10bb1c10ee7240c66a0b075e8103f73dd2fe36 100644
|
| --- a/net/base/net_util_unittest.cc
|
| +++ b/net/base/net_util_unittest.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -1631,3 +1631,12 @@ TEST(NetUtilTest, SetExplicitlyAllowedPortsTest) {
|
| EXPECT_EQ(i, net::explicitly_allowed_ports.size());
|
| }
|
| }
|
| +
|
| +TEST(NetUtilTest, GetHostOrSpecFromURL) {
|
| + EXPECT_EQ("example.com",
|
| + net::GetHostOrSpecFromURL(GURL("http://example.com/test")));
|
| + EXPECT_EQ("example.com",
|
| + net::GetHostOrSpecFromURL(GURL("http://example.com./test")));
|
| + EXPECT_EQ("file:///tmp/test.html",
|
| + net::GetHostOrSpecFromURL(GURL("file:///tmp/test.html")));
|
| +}
|
|
|