diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 02:37:40 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 02:37:40 +0000 |
commit | 79845effcd569cb61784e8a8c221f839e6e23525 (patch) | |
tree | d86e942097765499876b48a5d764592e2b9c376f /chrome/browser/cocoa/status_bubble_mac_unittest.mm | |
parent | 9902c201466fe4a701f43a124f4d22b6829c87e6 (diff) | |
download | chromium_src-79845effcd569cb61784e8a8c221f839e6e23525.zip chromium_src-79845effcd569cb61784e8a8c221f839e6e23525.tar.gz chromium_src-79845effcd569cb61784e8a8c221f839e6e23525.tar.bz2 |
Strip the trailing slash from URLs like "http://google.com/". This especially helps when the scheme has also been stripped, as it makes the hostname look less unbalanced. We're careful to avoid stripping the slash when doing so would confuse the omnibox.
This also moves to more aggressive stripping and/or unescaping in several places. In general, it seems like we should be as aggressive as is feasible.
BUG=43587
TEST=Visit google.com. There should be no slash in the address bar.
Review URL: http://codereview.chromium.org/2389002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/status_bubble_mac_unittest.mm')
-rw-r--r-- | chrome/browser/cocoa/status_bubble_mac_unittest.mm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/cocoa/status_bubble_mac_unittest.mm b/chrome/browser/cocoa/status_bubble_mac_unittest.mm index 6f4dab4..6a15f8b 100644 --- a/chrome/browser/cocoa/status_bubble_mac_unittest.mm +++ b/chrome/browser/cocoa/status_bubble_mac_unittest.mm @@ -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. @@ -141,7 +141,7 @@ TEST_F(StatusBubbleMacTest, SetURL) { EXPECT_TRUE([GetURLText() isEqualToString:@"foopy://"]); bubble_->SetURL(GURL("http://www.cnn.com"), L""); EXPECT_TRUE(IsVisible()); - EXPECT_TRUE([GetURLText() isEqualToString:@"www.cnn.com/"]); + EXPECT_TRUE([GetURLText() isEqualToString:@"www.cnn.com"]); } // Test hiding bubble that's already hidden. @@ -160,23 +160,23 @@ TEST_F(StatusBubbleMacTest, SetStatusAndURL) { bubble_->SetStatus(L"Status"); EXPECT_TRUE(IsVisible()); EXPECT_TRUE([GetBubbleViewText() isEqualToString:@"Status"]); - bubble_->SetURL(GURL("http://www.nytimes.com/"), L""); + bubble_->SetURL(GURL("http://www.nytimes.com"), L""); EXPECT_TRUE(IsVisible()); - EXPECT_TRUE([GetBubbleViewText() isEqualToString:@"www.nytimes.com/"]); + EXPECT_TRUE([GetBubbleViewText() isEqualToString:@"www.nytimes.com"]); bubble_->SetURL(GURL(), L""); EXPECT_TRUE(IsVisible()); EXPECT_TRUE([GetBubbleViewText() isEqualToString:@"Status"]); bubble_->SetStatus(L""); EXPECT_FALSE(IsVisible()); - bubble_->SetURL(GURL("http://www.nytimes.com/"), L""); + bubble_->SetURL(GURL("http://www.nytimes.com"), L""); EXPECT_TRUE(IsVisible()); - EXPECT_TRUE([GetBubbleViewText() isEqualToString:@"www.nytimes.com/"]); + EXPECT_TRUE([GetBubbleViewText() isEqualToString:@"www.nytimes.com"]); bubble_->SetStatus(L"Status"); EXPECT_TRUE(IsVisible()); EXPECT_TRUE([GetBubbleViewText() isEqualToString:@"Status"]); bubble_->SetStatus(L""); EXPECT_TRUE(IsVisible()); - EXPECT_TRUE([GetBubbleViewText() isEqualToString:@"www.nytimes.com/"]); + EXPECT_TRUE([GetBubbleViewText() isEqualToString:@"www.nytimes.com"]); bubble_->SetURL(GURL(), L""); EXPECT_FALSE(IsVisible()); } |