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

Side by Side Diff: chrome/browser/download/download_manager_unittest.cc

Issue 3899002: Modified the file extension filters for downloads to add some extensions to a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/download/download_exe.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/chrome_thread.h" 9 #include "chrome/browser/chrome_thread.h"
10 #include "chrome/browser/download/download_file.h" 10 #include "chrome/browser/download/download_file.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 { "http://www.foo.com/extensionless-extension", 105 { "http://www.foo.com/extensionless-extension",
106 "application/x-chrome-extension", 106 "application/x-chrome-extension",
107 true, 107 true,
108 false, 108 false,
109 true, }, 109 true, },
110 { "http://www.foo.com/save-as.pdf", 110 { "http://www.foo.com/save-as.pdf",
111 "application/pdf", 111 "application/pdf",
112 true, 112 true,
113 false, 113 false,
114 true, }, 114 true, },
115 { "http://www.foo.com/auto-open.pdf", 115 { "http://www.foo.com/always_prompt.pdf",
116 "application/pdf", 116 "application/pdf",
117 false, 117 false,
118 true, 118 true,
119 false, }, 119 true, },
120 }; 120 };
121 121
122 } // namespace 122 } // namespace
123 123
124 TEST_F(DownloadManagerTest, StartDownload) { 124 TEST_F(DownloadManagerTest, StartDownload) {
125 PrefService* prefs = profile_->GetPrefs(); 125 PrefService* prefs = profile_->GetPrefs();
126 prefs->SetFilePath(prefs::kDownloadDefaultDirectory, FilePath()); 126 prefs->SetFilePath(prefs::kDownloadDefaultDirectory, FilePath());
127 download_manager_->download_prefs()->EnableAutoOpenBasedOnExtension( 127 download_manager_->download_prefs()->EnableAutoOpenBasedOnExtension(
128 FilePath(FILE_PATH_LITERAL("example.pdf"))); 128 FilePath(FILE_PATH_LITERAL("example.pdf")));
129 129
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 download_manager_->OnAllDataSaved(i, 1024); 251 download_manager_->OnAllDataSaved(i, 1024);
252 download_manager_->FileSelected(new_path, i, info); 252 download_manager_->FileSelected(new_path, i, info);
253 } else { 253 } else {
254 download_manager_->FileSelected(new_path, i, info); 254 download_manager_->FileSelected(new_path, i, info);
255 download_manager_->OnAllDataSaved(i, 1024); 255 download_manager_->OnAllDataSaved(i, 1024);
256 } 256 }
257 257
258 message_loop_.RunAllPending(); 258 message_loop_.RunAllPending();
259 } 259 }
260 } 260 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_exe.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698