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

Unified Diff: content/browser/download/save_package_unittest.cc

Issue 2595753002: Decode url in save package download (Closed)
Patch Set: Use AsUtf8Unsafe to fix an issue on windows. Created 4 years 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
Index: content/browser/download/save_package_unittest.cc
diff --git a/content/browser/download/save_package_unittest.cc b/content/browser/download/save_package_unittest.cc
index f70e444b61d66a7c6d795c691f02aeb94e66c381..4c7b42c2d17a4b1a789b08581b8bf2a5955b2edc 100644
--- a/content/browser/download/save_package_unittest.cc
+++ b/content/browser/download/save_package_unittest.cc
@@ -392,6 +392,24 @@ static const struct SuggestedSaveNameTestCase {
FPL("bar"),
false
},
+ // A URL with escaped special characters, when title matches the URL.
+ { "http://foo.com/%40.txt",
+ base::ASCIIToUTF16("foo.com/%40.txt"),
+ FPL("@.txt"),
+ false
+ },
+ // A URL with unescaped special characters, when title matches the URL.
+ { "http://foo.com/@.txt",
+ base::ASCIIToUTF16("foo.com/@.txt"),
+ FPL("@.txt"),
+ false
+ },
+ // A URL with punycode in the host name, when title matches the URL.
+ { "http://xn--bcher-kva.com",
+ base::UTF8ToUTF16("bücher.com"),
+ FPL("bücher.com"),
+ false
+ },
// If the title matches the URL, but there is no "filename" component,
// use the domain.
{ "http://foo.com",
« content/browser/download/save_package.cc ('K') | « content/browser/download/save_package.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698