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

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

Issue 16007017: [Resumption 10/12] Use DI::IsDone to check for terminal downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with r204343 Created 7 years, 6 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 | « content/browser/download/download_item_impl.cc ('k') | content/public/browser/download_item.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) 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/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 MOCK_METHOD2(MockStart, void(DownloadFile*, DownloadRequestHandleInterface*)); 109 MOCK_METHOD2(MockStart, void(DownloadFile*, DownloadRequestHandleInterface*));
110 110
111 MOCK_METHOD0(Remove, void()); 111 MOCK_METHOD0(Remove, void());
112 MOCK_CONST_METHOD1(TimeRemaining, bool(base::TimeDelta*)); 112 MOCK_CONST_METHOD1(TimeRemaining, bool(base::TimeDelta*));
113 MOCK_CONST_METHOD0(CurrentSpeed, int64()); 113 MOCK_CONST_METHOD0(CurrentSpeed, int64());
114 MOCK_CONST_METHOD0(PercentComplete, int()); 114 MOCK_CONST_METHOD0(PercentComplete, int());
115 MOCK_CONST_METHOD0(AllDataSaved, bool()); 115 MOCK_CONST_METHOD0(AllDataSaved, bool());
116 MOCK_CONST_METHOD1(MatchesQuery, bool(const string16& query)); 116 MOCK_CONST_METHOD1(MatchesQuery, bool(const string16& query));
117 MOCK_CONST_METHOD0(IsPartialDownload, bool()); 117 MOCK_CONST_METHOD0(IsDone, bool());
118 MOCK_CONST_METHOD0(IsInProgress, bool()); 118 MOCK_CONST_METHOD0(IsInProgress, bool());
119 MOCK_CONST_METHOD0(IsCancelled, bool()); 119 MOCK_CONST_METHOD0(IsCancelled, bool());
120 MOCK_CONST_METHOD0(IsInterrupted, bool()); 120 MOCK_CONST_METHOD0(IsInterrupted, bool());
121 MOCK_CONST_METHOD0(IsComplete, bool()); 121 MOCK_CONST_METHOD0(IsComplete, bool());
122 MOCK_CONST_METHOD0(GetFullPath, const base::FilePath&()); 122 MOCK_CONST_METHOD0(GetFullPath, const base::FilePath&());
123 MOCK_CONST_METHOD0(GetTargetFilePath, const base::FilePath&()); 123 MOCK_CONST_METHOD0(GetTargetFilePath, const base::FilePath&());
124 MOCK_CONST_METHOD0(GetTargetDisposition, TargetDisposition()); 124 MOCK_CONST_METHOD0(GetTargetDisposition, TargetDisposition());
125 MOCK_METHOD1(OnContentCheckCompleted, void(DownloadDangerType)); 125 MOCK_METHOD1(OnContentCheckCompleted, void(DownloadDangerType));
126 MOCK_CONST_METHOD0(GetState, DownloadState()); 126 MOCK_CONST_METHOD0(GetState, DownloadState());
127 MOCK_CONST_METHOD0(GetUrlChain, const std::vector<GURL>&()); 127 MOCK_CONST_METHOD0(GetUrlChain, const std::vector<GURL>&());
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 .WillOnce(Return()); 678 .WillOnce(Return());
679 EXPECT_CALL(GetMockDownloadItem(3), Remove()) 679 EXPECT_CALL(GetMockDownloadItem(3), Remove())
680 .Times(0); 680 .Times(0);
681 681
682 download_manager_->RemoveAllDownloads(); 682 download_manager_->RemoveAllDownloads();
683 // Because we're mocking the download item, the Remove call doesn't 683 // Because we're mocking the download item, the Remove call doesn't
684 // result in them being removed from the DownloadManager list. 684 // result in them being removed from the DownloadManager list.
685 } 685 }
686 686
687 } // namespace content 687 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/public/browser/download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698