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

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: Trying again, seem to be merge issues on try server 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
« 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
old mode 100644
new mode 100755
index d8879fe8121ee5ce700d948ea3d0bc5a2a40b388..6439558681cba26bb2a67af40931394a2f63dfd4
--- a/net/base/net_util_unittest.cc
+++ b/net/base/net_util_unittest.cc
@@ -1858,7 +1858,7 @@ TEST(NetUtilTest, GenerateFileName) {
"",
"binary/octet-stream",
L"download",
- L"evil.exe"
+ L"evil.exe-"
},
{
"http://www.goodguy.com/evil.exe.",
@@ -1867,7 +1867,7 @@ TEST(NetUtilTest, GenerateFileName) {
"",
"binary/octet-stream",
L"download",
- L"evil.exe"
+ L"evil.exe-"
},
{
"http://www.goodguy.com/evil.exe. . .",
@@ -1876,7 +1876,7 @@ TEST(NetUtilTest, GenerateFileName) {
"",
"binary/octet-stream",
L"download",
- L"evil.exe"
+ L"evil.exe-------"
},
{
"http://www.goodguy.com/evil.",
@@ -1885,7 +1885,7 @@ TEST(NetUtilTest, GenerateFileName) {
"",
"binary/octet-stream",
L"download",
- L"evil"
+ L"evil-"
},
{
"http://www.goodguy.com/. . . . .",
@@ -1896,6 +1896,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",
@@ -1994,7 +2003,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.",
@@ -2003,7 +2016,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/.",
« 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