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

Side by Side Diff: content/browser/download/download_manager_impl_unittest.cc

Issue 11941015: Move OpenItem/ShowItemInFolder from ContentBrowserClient to DownloadManagerDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: _ Created 7 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 MOCK_METHOD1(SetOpened, void(bool)); 157 MOCK_METHOD1(SetOpened, void(bool));
158 MOCK_CONST_METHOD0(GetOpened, bool()); 158 MOCK_CONST_METHOD0(GetOpened, bool());
159 MOCK_CONST_METHOD0(GetLastModifiedTime, const std::string&()); 159 MOCK_CONST_METHOD0(GetLastModifiedTime, const std::string&());
160 MOCK_CONST_METHOD0(GetETag, const std::string&()); 160 MOCK_CONST_METHOD0(GetETag, const std::string&());
161 MOCK_CONST_METHOD0(GetLastReason, DownloadInterruptReason()); 161 MOCK_CONST_METHOD0(GetLastReason, DownloadInterruptReason());
162 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); 162 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*());
163 MOCK_CONST_METHOD0(GetWebContents, WebContents*()); 163 MOCK_CONST_METHOD0(GetWebContents, WebContents*());
164 MOCK_CONST_METHOD0(GetFileNameToReportUser, FilePath()); 164 MOCK_CONST_METHOD0(GetFileNameToReportUser, FilePath());
165 MOCK_METHOD1(SetDisplayName, void(const FilePath&)); 165 MOCK_METHOD1(SetDisplayName, void(const FilePath&));
166 MOCK_CONST_METHOD0(GetUserVerifiedFilePath, FilePath()); 166 MOCK_CONST_METHOD0(GetUserVerifiedFilePath, FilePath());
167 MOCK_METHOD0(MockDownloadOpenForTesting, void());
168 // May be called when vlog is on. 167 // May be called when vlog is on.
169 virtual std::string DebugString(bool verbose) const OVERRIDE { return ""; } 168 virtual std::string DebugString(bool verbose) const OVERRIDE { return ""; }
170 }; 169 };
171 170
172 class MockDownloadManagerDelegate : public DownloadManagerDelegate { 171 class MockDownloadManagerDelegate : public DownloadManagerDelegate {
173 public: 172 public:
174 MockDownloadManagerDelegate(); 173 MockDownloadManagerDelegate();
175 virtual ~MockDownloadManagerDelegate(); 174 virtual ~MockDownloadManagerDelegate();
176 175
177 MOCK_METHOD0(Shutdown, void()); 176 MOCK_METHOD0(Shutdown, void());
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 callback_called_ = false; 641 callback_called_ = false;
643 DetermineDownloadTarget(&item); 642 DetermineDownloadTarget(&item);
644 EXPECT_TRUE(callback_called_); 643 EXPECT_TRUE(callback_called_);
645 EXPECT_EQ(path, target_path_); 644 EXPECT_EQ(path, target_path_);
646 EXPECT_EQ(DownloadItem::TARGET_DISPOSITION_OVERWRITE, target_disposition_); 645 EXPECT_EQ(DownloadItem::TARGET_DISPOSITION_OVERWRITE, target_disposition_);
647 EXPECT_EQ(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, danger_type_); 646 EXPECT_EQ(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, danger_type_);
648 EXPECT_EQ(path, intermediate_path_); 647 EXPECT_EQ(path, intermediate_path_);
649 } 648 }
650 649
651 } // namespace content 650 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698