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

Unified Diff: net/base/net_util_unittest.cc

Issue 2733005: Download filename encoding fix [try2]: (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: add test Created 10 years, 6 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 | « net/base/net_util.cc ('k') | 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 dff3d1cdb6b63eb750f8c3eb7bdc1c77cc0e2069..9bc5d585d1f1d24474bbdcb2327cad43c0a04fb7 100644
--- a/net/base/net_util_unittest.cc
+++ b/net/base/net_util_unittest.cc
@@ -1060,6 +1060,23 @@ TEST(NetUtilTest, GetSuggestedFilename) {
"",
L"",
L"test"},
+ // The filename encoding is specified by the referrer charset.
+ {"http://example.com/V%FDvojov%E1%20psychologie.doc",
+ "",
+ "iso-8859-1",
+ L"",
+ L"V\u00fdvojov\u00e1 psychologie.doc"},
+ // The filename encoding doesn't match the referrer charset, the
+ // system charset, or UTF-8.
+ // TODO(jshin): we need to handle this case.
+#if 0
+ {"http://example.com/V%FDvojov%E1%20psychologie.doc",
+ "",
+ "utf-8",
+ L"",
+ L"V\u00fdvojov\u00e1 psychologie.doc",
+ },
+#endif
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) {
#if defined(OS_WIN)
« no previous file with comments | « net/base/net_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698