diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-05 09:25:22 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-05 09:25:22 +0000 |
commit | 3429f12dc7a7de81516b77719c208a3590981b04 (patch) | |
tree | a2fc5a8c1d4bb612f45f56778a63f465766d1b67 | |
parent | ee7dee9d799e82617b75da1a95ac365dc34f4e66 (diff) | |
download | chromium_src-3429f12dc7a7de81516b77719c208a3590981b04.zip chromium_src-3429f12dc7a7de81516b77719c208a3590981b04.tar.gz chromium_src-3429f12dc7a7de81516b77719c208a3590981b04.tar.bz2 |
Tell the user that HTML documents can harm their computer because they can.
This patch blocks all the extensions that we register.
R=nsylvain
BUG=1463961
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4769 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/download/download_exe.cc | 9 | ||||
-rw-r--r-- | chrome/browser/download/download_uitest.cc | 4 | ||||
-rw-r--r-- | chrome/test/data/download-test3.gif (renamed from chrome/test/data/download-test3.html) | 0 | ||||
-rw-r--r-- | chrome/test/data/download-test3.gif.mock-http-headers (renamed from chrome/test/data/download-test3.html.mock-http-headers) | 4 |
4 files changed, 12 insertions, 5 deletions
diff --git a/chrome/browser/download/download_exe.cc b/chrome/browser/download/download_exe.cc index ce33781..e54b485 100644 --- a/chrome/browser/download/download_exe.cc +++ b/chrome/browser/download/download_exe.cc @@ -72,6 +72,8 @@ static const wchar_t* const g_executables[] = { L"fxp", L"hlp", L"hta", + L"htm", + L"html", L"inf", L"ins", L"isp", @@ -115,6 +117,8 @@ static const wchar_t* const g_executables[] = { L"sct", L"shb", L"shs", + L"shtm", + L"shtml", L"url", L"vb", L"vbe", @@ -127,7 +131,10 @@ static const wchar_t* const g_executables[] = { L"ws", L"wsc", L"wsf", - L"wsh" + L"wsh", + L"xht", + L"xhtm", + L"xhtml" }; void InitializeExeTypes(std::set<std::wstring>* exe_extensions) { diff --git a/chrome/browser/download/download_uitest.cc b/chrome/browser/download/download_uitest.cc index c961841..92e826f 100644 --- a/chrome/browser/download/download_uitest.cc +++ b/chrome/browser/download/download_uitest.cc @@ -201,8 +201,8 @@ TEST_F(DownloadTest, NoDownload) { // download tab opened and the file exists as the filename specified in the // header. This also ensures we properly handle empty file downloads. TEST_F(DownloadTest, ContentDisposition) { - wstring file = L"download-test3.html"; - wstring download_file = L"download-test3-attachment.html"; + wstring file = L"download-test3.gif"; + wstring download_file = L"download-test3-attachment.gif"; wstring expected_title = L"100% - " + download_file; EXPECT_EQ(1, GetTabCount()); diff --git a/chrome/test/data/download-test3.html b/chrome/test/data/download-test3.gif index e69de29..e69de29 100644 --- a/chrome/test/data/download-test3.html +++ b/chrome/test/data/download-test3.gif diff --git a/chrome/test/data/download-test3.html.mock-http-headers b/chrome/test/data/download-test3.gif.mock-http-headers index 3a2e781..efdb82d 100644 --- a/chrome/test/data/download-test3.html.mock-http-headers +++ b/chrome/test/data/download-test3.gif.mock-http-headers @@ -1,6 +1,6 @@ HTTP/1.1 200 OK -Content-Type: text/html; charset=utf-8 -Content-Disposition: attachment; filename="download-test3-attachment.html" +Content-Type: image/gif +Content-Disposition: attachment; filename="download-test3-attachment.gif" Content-Length: 0 Date: Mon, 13 Nov 2006 21:38:09 GMT Expires: Tue, 14 Nov 2006 19:23:58 GMT |