diff options
author | jschuh@google.com <jschuh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-03 01:57:38 +0000 |
---|---|---|
committer | jschuh@google.com <jschuh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-03 01:57:38 +0000 |
commit | 223c449d19eb5d889bc828e011c1a23e5d52b4c9 (patch) | |
tree | ce4ae0a09ff459b9514ef82819f737c9229d802c /chrome/browser/download | |
parent | c1d1958834699761bf8e122a8325ec66fdce59e9 (diff) | |
download | chromium_src-223c449d19eb5d889bc828e011c1a23e5d52b4c9.zip chromium_src-223c449d19eb5d889bc828e011c1a23e5d52b4c9.tar.gz chromium_src-223c449d19eb5d889bc828e011c1a23e5d52b4c9.tar.bz2 |
Handle CreateFile() trimming trailing dots and spaces in downloads.
BUG=37007
TEST=unit_tests --gtest_filter=DownloadManagerTest.*
Review URL: http://codereview.chromium.org/660297
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r-- | chrome/browser/download/download_manager_unittest.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/browser/download/download_manager_unittest.cc b/chrome/browser/download/download_manager_unittest.cc index 7e8f186..91e0b1c 100644 --- a/chrome/browser/download/download_manager_unittest.cc +++ b/chrome/browser/download/download_manager_unittest.cc @@ -161,6 +161,33 @@ const struct { "http://www.goodguy.com/evil.exe", "application/rss+xml", L"evil.download"}, + + // Test truncation of trailing dots and spaces + {"filename=evil.exe ", + "http://www.goodguy.com/evil.exe ", + "binary/octet-stream", + L"evil.exe"}, + + {"filename=evil.exe.", + "http://www.goodguy.com/evil.exe.", + "binary/octet-stream", + L"evil.exe"}, + + {"filename=evil.exe. . .", + "http://www.goodguy.com/evil.exe. . .", + "binary/octet-stream", + L"evil.exe"}, + + {"filename=evil.", + "http://www.goodguy.com/evil.", + "binary/octet-stream", + L"evil"}, + + {"filename=. . . . .", + "http://www.goodguy.com/. . . . .", + "binary/octet-stream", + L"download"}, + #endif // OS_WIN {"filename=utils.js", |