diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-23 07:17:54 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-23 07:17:54 +0000 |
commit | 9d797f394f319b754ed91a981dab566d764d2c2e (patch) | |
tree | aee695b1c2af9d540e3fe99d834de015f70665cf /net/base/net_util_unittest.cc | |
parent | 97c9e77b34099c518f85571f6d36e178d7695b23 (diff) | |
download | chromium_src-9d797f394f319b754ed91a981dab566d764d2c2e.zip chromium_src-9d797f394f319b754ed91a981dab566d764d2c2e.tar.gz chromium_src-9d797f394f319b754ed91a981dab566d764d2c2e.tar.bz2 |
Send content settings based on the URL to the renderer instead of just the host.
BUG=36025
TEST=manual
Review URL: http://codereview.chromium.org/1744003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45424 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_util_unittest.cc')
-rw-r--r-- | net/base/net_util_unittest.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/base/net_util_unittest.cc b/net/base/net_util_unittest.cc index 833375c..0d10bb1 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"))); +} |