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

Unified Diff: net/base/filename_util_unittest.cc

Issue 1107913003: Remove support for "name" parameter from Content-Disposition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust comment for clarity Created 5 years, 8 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/download/download_stats.cc ('k') | net/http/http_content_disposition.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/filename_util_unittest.cc
diff --git a/net/base/filename_util_unittest.cc b/net/base/filename_util_unittest.cc
index 4a8c4b51f0b6fe706ab0f17eaf3d7105bff2aed2..a251a153022df3ba67a1973f042880854734c7e7 100644
--- a/net/base/filename_util_unittest.cc
+++ b/net/base/filename_util_unittest.cc
@@ -594,14 +594,15 @@ TEST(FilenameUtilTest, GenerateFileName) {
"",
L"",
L"caf\u03b5.png"},
- {__LINE__,
+ {// Invalid C-D header. Name value is skipped now.
+ __LINE__,
"http://www.example.com/file?id=3",
"attachment; name=\xcf\xc2\xd4\xd8.zip",
"GBK",
"",
"",
L"",
- L"\u4e0b\u8f7d.zip"},
+ L"file"},
{// Invalid C-D header. Extracts filename from url.
__LINE__,
"http://www.google.com/test.html",
@@ -732,7 +733,7 @@ TEST(FilenameUtilTest, GenerateFileName) {
"image/jpeg",
L"download",
L"\uc608\uc220 \uc608\uc220.jpg"},
- {// name= parameter
+ {// Invalid C-D header. Name value is skipped now.
__LINE__,
"http://www.examples.com/q.cgi?id=abc",
"attachment; name=abc de.pdf",
@@ -740,7 +741,7 @@ TEST(FilenameUtilTest, GenerateFileName) {
"",
"application/octet-stream",
L"download",
- L"abc de.pdf"},
+ L"q.cgi"},
{__LINE__,
"http://www.example.com/path",
"filename=\"=?EUC-JP?Q?=B7=DD=BD=D13=2Epng?=\"",
« no previous file with comments | « content/browser/download/download_stats.cc ('k') | net/http/http_content_disposition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698