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

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

Issue 2825056: Recommit r52848 - Option-click to download should not display "Save As" UI. (Closed)
Patch Set: Created 10 years, 5 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
« no previous file with comments | « chrome/browser/download/download_manager.cc ('k') | chrome/browser/history/download_types.h » ('j') | 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_manager.h" 10 #include "chrome/browser/download/download_manager.h"
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 PrefService* prefs = profile_->GetPrefs(); 678 PrefService* prefs = profile_->GetPrefs();
679 prefs->SetFilePath(prefs::kDownloadDefaultDirectory, FilePath()); 679 prefs->SetFilePath(prefs::kDownloadDefaultDirectory, FilePath());
680 download_manager_->OpenFilesBasedOnExtension( 680 download_manager_->OpenFilesBasedOnExtension(
681 FilePath(FILE_PATH_LITERAL("example.pdf")), true); 681 FilePath(FILE_PATH_LITERAL("example.pdf")), true);
682 682
683 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kStartDownloadCases); ++i) { 683 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kStartDownloadCases); ++i) {
684 prefs->SetBoolean(prefs::kPromptForDownload, 684 prefs->SetBoolean(prefs::kPromptForDownload,
685 kStartDownloadCases[i].prompt_for_download); 685 kStartDownloadCases[i].prompt_for_download);
686 686
687 DownloadCreateInfo info; 687 DownloadCreateInfo info;
688 info.save_as = kStartDownloadCases[i].save_as; 688 info.prompt_user_for_save_location = kStartDownloadCases[i].save_as;
689 info.url = GURL(kStartDownloadCases[i].url); 689 info.url = GURL(kStartDownloadCases[i].url);
690 info.mime_type = kStartDownloadCases[i].mime_type; 690 info.mime_type = kStartDownloadCases[i].mime_type;
691 691
692 download_manager_->StartDownload(&info); 692 download_manager_->StartDownload(&info);
693 693
694 EXPECT_EQ(kStartDownloadCases[i].expected_save_as, info.save_as); 694 EXPECT_EQ(kStartDownloadCases[i].expected_save_as,
695 info.prompt_user_for_save_location);
695 } 696 }
696 } 697 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_manager.cc ('k') | chrome/browser/history/download_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698