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

Unified Diff: net/base/net_util_unittest.cc

Issue 536005: Add dotfile tests to NetUtil.GetSuggestedFilename (Closed)
Patch Set: Created 10 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util_unittest.cc
diff --git a/net/base/net_util_unittest.cc b/net/base/net_util_unittest.cc
index 9dd8510fd5997abd44be78693629899522e96ebb..9265f0a439ca1f98843b372e9cc4eddc734596be 100644
--- a/net/base/net_util_unittest.cc
+++ b/net/base/net_util_unittest.cc
@@ -1021,6 +1021,22 @@ TEST(NetUtilTest, GetSuggestedFilename) {
"",
L"\u65e5\u672c\u8a9e", // Japanese Kanji.
L"\u65e5\u672c\u8a9e"},
+ // Dotfiles. Ensures preceeding period(s) stripped.
+ {"http://www.google.com/.test.html",
+ "",
+ "",
+ L"",
+ L"test.html"},
+ {"http://www.google.com/.test",
+ "",
+ "",
+ L"",
+ L"test"},
+ {"http://www.google.com/..test",
+ "",
+ "",
+ L"",
+ L"test"},
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) {
#if defined(OS_WIN)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698