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

Unified Diff: net/base/net_util_unittest.cc

Issue 7647014: Replace whitespace at beginning and end of file with hyphens, rather than silently discarding. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Retrying patch set due to Rietveld issues Created 9 years, 4 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
« net/base/net_util.cc ('K') | « 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 fe1805903626839dbd8548236910c6d94d1991aa..d03c2ba4ef740d60a0a63b7b9534f6986827ceb3 100644
--- a/net/base/net_util_unittest.cc
+++ b/net/base/net_util_unittest.cc
@@ -1857,7 +1857,7 @@ TEST(NetUtilTest, GenerateFileName) {
"",
"binary/octet-stream",
L"download",
- L"evil.exe"
+ L"evil.exe-"
},
{
"http://www.goodguy.com/evil.exe.",
@@ -1866,7 +1866,7 @@ TEST(NetUtilTest, GenerateFileName) {
"",
"binary/octet-stream",
L"download",
- L"evil.exe"
+ L"evil.exe-"
},
{
"http://www.goodguy.com/evil.exe. . .",
@@ -1875,7 +1875,7 @@ TEST(NetUtilTest, GenerateFileName) {
"",
"binary/octet-stream",
L"download",
- L"evil.exe"
+ L"evil.exe-------"
},
{
"http://www.goodguy.com/evil.",
@@ -1884,7 +1884,7 @@ TEST(NetUtilTest, GenerateFileName) {
"",
"binary/octet-stream",
L"download",
- L"evil"
+ L"evil-"
},
{
"http://www.goodguy.com/. . . . .",
@@ -1895,6 +1895,15 @@ TEST(NetUtilTest, GenerateFileName) {
L"download",
L"download"
},
+ {
+ "http://www.badguy.com/attachment?name=meh.exe%C2%A0",
+ "attachment; filename=\"meh.exe\xC2\xA0\"",
+ "",
+ "",
+ "binary/octet-stream",
+ L"",
+ L"meh.exe-"
+ },
#endif // OS_WIN
{
"http://www.goodguy.com/utils.js",
@@ -1993,7 +2002,11 @@ TEST(NetUtilTest, GenerateFileName) {
"",
"dance/party",
L"download",
+#if defined(OS_WIN)
+ L"trailing-"
+#else
L"trailing"
+#endif //OS_WIN
},
{
"http://www.evil.com/trailing.",
@@ -2002,7 +2015,11 @@ TEST(NetUtilTest, GenerateFileName) {
"",
"text/plain",
L"download",
+#if defined(OS_WIN)
+ L"trailing-" TXT_EXT
+#else
L"trailing" TXT_EXT
+#endif //OS_WIN
},
{
"http://www.evil.com/.",
« net/base/net_util.cc ('K') | « net/base/net_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698