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

Unified Diff: net/http/http_content_disposition_unittest.cc

Issue 9317018: referrer_charset is a lie. It's really the user's default_charset. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « net/http/http_content_disposition.cc ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_content_disposition_unittest.cc
===================================================================
--- net/http/http_content_disposition_unittest.cc (revision 119865)
+++ net/http/http_content_disposition_unittest.cc (working copy)
@@ -13,7 +13,7 @@
struct FileNameCDCase {
const char* header;
- const char* referrer_charset;
+ const char* default_charset;
const wchar_t* expected;
};
@@ -70,7 +70,7 @@
{"attachment; filename=\"=?windows-1252?Q?caf=E9?="
" =?iso-8859-7?b?4eI=?= .png\"", "", L"caf\x00e9\x03b1\x03b2.png"},
// Non-ASCII string is passed through and treated as UTF-8 as long as
- // it's valid as UTF-8 and regardless of |referrer_charset|.
+ // it's valid as UTF-8 and regardless of |default_charset|.
{"attachment; filename=caf\xc3\xa9.png",
"iso-8859-1", L"caf\x00e9.png"},
{"attachment; filename=caf\xc3\xa9.png",
@@ -191,7 +191,7 @@
L"foo.html"},
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
- HttpContentDisposition header(tests[i].header, tests[i].referrer_charset);
+ HttpContentDisposition header(tests[i].header, tests[i].default_charset);
EXPECT_EQ(tests[i].expected,
UTF8ToWide(header.filename()))
<< "Failed on input: " << tests[i].header;
« no previous file with comments | « net/http/http_content_disposition.cc ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698