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

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

Issue 11711003: Remove the DownloadItem::TogglePause() interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to r175145. 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 MOCK_METHOD1(MockStart, void(DownloadFile*)); 105 MOCK_METHOD1(MockStart, void(DownloadFile*));
106 106
107 MOCK_METHOD1(Delete, void(DeleteReason)); 107 MOCK_METHOD1(Delete, void(DeleteReason));
108 MOCK_METHOD0(Remove, void()); 108 MOCK_METHOD0(Remove, void());
109 MOCK_CONST_METHOD1(TimeRemaining, bool(base::TimeDelta*)); 109 MOCK_CONST_METHOD1(TimeRemaining, bool(base::TimeDelta*));
110 MOCK_CONST_METHOD0(CurrentSpeed, int64()); 110 MOCK_CONST_METHOD0(CurrentSpeed, int64());
111 MOCK_CONST_METHOD0(PercentComplete, int()); 111 MOCK_CONST_METHOD0(PercentComplete, int());
112 MOCK_CONST_METHOD0(AllDataSaved, bool()); 112 MOCK_CONST_METHOD0(AllDataSaved, bool());
113 MOCK_METHOD0(TogglePause, void());
114 MOCK_CONST_METHOD1(MatchesQuery, bool(const string16& query)); 113 MOCK_CONST_METHOD1(MatchesQuery, bool(const string16& query));
115 MOCK_CONST_METHOD0(IsPartialDownload, bool()); 114 MOCK_CONST_METHOD0(IsPartialDownload, bool());
116 MOCK_CONST_METHOD0(IsInProgress, bool()); 115 MOCK_CONST_METHOD0(IsInProgress, bool());
117 MOCK_CONST_METHOD0(IsCancelled, bool()); 116 MOCK_CONST_METHOD0(IsCancelled, bool());
118 MOCK_CONST_METHOD0(IsInterrupted, bool()); 117 MOCK_CONST_METHOD0(IsInterrupted, bool());
119 MOCK_CONST_METHOD0(IsComplete, bool()); 118 MOCK_CONST_METHOD0(IsComplete, bool());
120 MOCK_CONST_METHOD0(GetFullPath, const FilePath&()); 119 MOCK_CONST_METHOD0(GetFullPath, const FilePath&());
121 MOCK_CONST_METHOD0(GetTargetFilePath, const FilePath&()); 120 MOCK_CONST_METHOD0(GetTargetFilePath, const FilePath&());
122 MOCK_CONST_METHOD0(GetTargetDisposition, TargetDisposition()); 121 MOCK_CONST_METHOD0(GetTargetDisposition, TargetDisposition());
123 MOCK_METHOD1(OnContentCheckCompleted, void(DownloadDangerType)); 122 MOCK_METHOD1(OnContentCheckCompleted, void(DownloadDangerType));
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 callback_called_ = false; 643 callback_called_ = false;
645 DetermineDownloadTarget(&item); 644 DetermineDownloadTarget(&item);
646 EXPECT_TRUE(callback_called_); 645 EXPECT_TRUE(callback_called_);
647 EXPECT_EQ(path, target_path_); 646 EXPECT_EQ(path, target_path_);
648 EXPECT_EQ(DownloadItem::TARGET_DISPOSITION_OVERWRITE, target_disposition_); 647 EXPECT_EQ(DownloadItem::TARGET_DISPOSITION_OVERWRITE, target_disposition_);
649 EXPECT_EQ(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, danger_type_); 648 EXPECT_EQ(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, danger_type_);
650 EXPECT_EQ(path, intermediate_path_); 649 EXPECT_EQ(path, intermediate_path_);
651 } 650 }
652 651
653 } // namespace content 652 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl_unittest.cc ('k') | content/public/browser/download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698