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

Unified Diff: net/base/filename_util_unittest.cc

Issue 640713002: Generated FIlename different from Content Disposition string (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unittests Created 6 years, 2 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/filename_util_internal.cc ('k') | no next file » | 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 220103300cbfe76bd91e34995ac5433c8685c022..2199d7cf59deb722734025427d67ec994dfcf1ab 100644
--- a/net/base/filename_util_unittest.cc
+++ b/net/base/filename_util_unittest.cc
@@ -810,6 +810,16 @@ TEST(FilenameUtilTest, GenerateFileName) {
L"",
L"test.html"
},
+ {
+ __LINE__,
+ "http://www.google.com/test",
+ "attachment; filename=test",
+ "utf-8",
+ "",
+ "image/png",
+ L"",
+ L"test"
+ },
#if 0
{ // The filename encoding doesn't match the referrer charset, the system
// charset, or UTF-8.
@@ -1022,7 +1032,7 @@ TEST(FilenameUtilTest, GenerateFileName) {
"",
"text/plain",
L"default",
- L"-blink-Hello kitty--blink-" TXT_EXT
+ L"-blink-Hello kitty--blink-"
},
{ // A normal avi should get .avi and not .avi.avi
__LINE__,
@@ -1042,7 +1052,7 @@ TEST(FilenameUtilTest, GenerateFileName) {
"",
"image/jpeg",
L"download",
- L"my-cat" JPEG_EXT
+ L"my-cat"
},
{
__LINE__,
@@ -1052,7 +1062,7 @@ TEST(FilenameUtilTest, GenerateFileName) {
"",
"text/plain",
L"download",
- L"my-cat.txt"
+ L"my-cat"
},
{
__LINE__,
@@ -1062,7 +1072,7 @@ TEST(FilenameUtilTest, GenerateFileName) {
"",
"text/html",
L"download",
- L"my-cat" HTML_EXT
+ L"my-cat"
},
{ // Unknown MIME type
__LINE__,
@@ -1286,7 +1296,7 @@ TEST(FilenameUtilTest, GenerateFileName) {
"",
"text/plain",
L"download",
- L"hidden" TXT_EXT
+ L"hidden"
},
{
__LINE__,
@@ -1311,9 +1321,9 @@ TEST(FilenameUtilTest, GenerateFileName) {
"text/plain",
L"download",
#if defined(OS_WIN)
- L"trailing-" TXT_EXT
+ L"trailing-"
#else
- L"trailing" TXT_EXT
+ L"trailing"
#endif
},
{
« no previous file with comments | « net/base/filename_util_internal.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698