Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Unified Diff: content/browser/tab_contents/navigation_entry_unittest.cc

Issue 6591127: fix display of filenames in file:/// URLs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whitespace Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/tab_contents/navigation_entry.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/navigation_entry_unittest.cc
diff --git a/content/browser/tab_contents/navigation_entry_unittest.cc b/content/browser/tab_contents/navigation_entry_unittest.cc
index 4b5bfb08dbdc67ea1c2d7b748ec6d53fe92b5e63..9d5edc836a637e253ded8dedae4dcd216eb61700 100644
--- a/content/browser/tab_contents/navigation_entry_unittest.cc
+++ b/content/browser/tab_contents/navigation_entry_unittest.cc
@@ -62,6 +62,11 @@ TEST_F(NavigationEntryTest, NavigationEntryURLs) {
EXPECT_EQ(ASCIIToUTF16("www.google.com"),
entry1_.get()->GetTitleForDisplay(""));
+ // file:/// URLs should only show the filename.
+ entry1_.get()->set_url(GURL("file:///foo/bar baz.txt"));
+ EXPECT_EQ(ASCIIToUTF16("bar baz.txt"),
+ entry1_.get()->GetTitleForDisplay(""));
+
// Title affects GetTitleForDisplay
entry1_.get()->set_title(ASCIIToUTF16("Google"));
EXPECT_EQ(ASCIIToUTF16("Google"), entry1_.get()->GetTitleForDisplay(""));
« no previous file with comments | « content/browser/tab_contents/navigation_entry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698