Index: chrome/browser/ui/download/download_tab_helper.cc |
diff --git a/chrome/browser/ui/download/download_tab_helper.cc b/chrome/browser/ui/download/download_tab_helper.cc |
index 54a95de7cb309ef8540421f3420cc00d67d88237..cb674e5ac179abfa827849b9e832e19ae82a7030 100644 |
--- a/chrome/browser/ui/download/download_tab_helper.cc |
+++ b/chrome/browser/ui/download/download_tab_helper.cc |
@@ -68,6 +68,19 @@ bool DownloadTabHelper::SavePage(const FilePath& main_file, |
return save_package_->Init(); |
} |
+// Used in automated testing to check the folder where an HTML is saved. |
+string16 DownloadTabHelper::SavePageToProperDirectory( |
+ const FilePath& website_save_dir, |
+ const FilePath& download_save_dir, |
+ SavePackage::SavePackageType save_type) { |
+ tab_contents()->Stop(); |
+ |
+ save_package_ = new SavePackage(tab_contents_wrapper_); |
+ save_package_->SetShouldPromptUser(false); |
+ save_package_->GetSaveInfo(website_save_dir, download_save_dir, save_type); |
+ return tab_contents()->GetTitle(); |
Randy Smith (Not in Mondays)
2011/05/31 23:03:10
This makes me nervous. By name and placement, thi
haraken1
2011/06/02 09:13:22
I agree. Now I revised this SavePageToProperDirect
|
+} |
+ |
bool DownloadTabHelper::CanDownload(int request_id) { |
if (delegate_) |
return delegate_->CanDownload(request_id); |