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/.", |