OLD | NEW |
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 MockStart(download_file.get(), req_handle.get()); | 113 MockStart(download_file.get(), req_handle.get()); |
114 } | 114 } |
115 | 115 |
116 MOCK_METHOD2(MockStart, void(DownloadFile*, DownloadRequestHandleInterface*)); | 116 MOCK_METHOD2(MockStart, void(DownloadFile*, DownloadRequestHandleInterface*)); |
117 | 117 |
118 MOCK_METHOD0(Remove, void()); | 118 MOCK_METHOD0(Remove, void()); |
119 MOCK_CONST_METHOD1(TimeRemaining, bool(base::TimeDelta*)); | 119 MOCK_CONST_METHOD1(TimeRemaining, bool(base::TimeDelta*)); |
120 MOCK_CONST_METHOD0(CurrentSpeed, int64()); | 120 MOCK_CONST_METHOD0(CurrentSpeed, int64()); |
121 MOCK_CONST_METHOD0(PercentComplete, int()); | 121 MOCK_CONST_METHOD0(PercentComplete, int()); |
122 MOCK_CONST_METHOD0(AllDataSaved, bool()); | 122 MOCK_CONST_METHOD0(AllDataSaved, bool()); |
123 MOCK_CONST_METHOD1(MatchesQuery, bool(const string16& query)); | 123 MOCK_CONST_METHOD1(MatchesQuery, bool(const base::string16& query)); |
124 MOCK_CONST_METHOD0(IsDone, bool()); | 124 MOCK_CONST_METHOD0(IsDone, bool()); |
125 MOCK_CONST_METHOD0(GetFullPath, const base::FilePath&()); | 125 MOCK_CONST_METHOD0(GetFullPath, const base::FilePath&()); |
126 MOCK_CONST_METHOD0(GetTargetFilePath, const base::FilePath&()); | 126 MOCK_CONST_METHOD0(GetTargetFilePath, const base::FilePath&()); |
127 MOCK_CONST_METHOD0(GetTargetDisposition, TargetDisposition()); | 127 MOCK_CONST_METHOD0(GetTargetDisposition, TargetDisposition()); |
128 MOCK_METHOD1(OnContentCheckCompleted, void(DownloadDangerType)); | 128 MOCK_METHOD1(OnContentCheckCompleted, void(DownloadDangerType)); |
129 MOCK_CONST_METHOD0(GetState, DownloadState()); | 129 MOCK_CONST_METHOD0(GetState, DownloadState()); |
130 MOCK_CONST_METHOD0(GetUrlChain, const std::vector<GURL>&()); | 130 MOCK_CONST_METHOD0(GetUrlChain, const std::vector<GURL>&()); |
131 MOCK_METHOD1(SetTotalBytes, void(int64)); | 131 MOCK_METHOD1(SetTotalBytes, void(int64)); |
132 MOCK_CONST_METHOD0(GetURL, const GURL&()); | 132 MOCK_CONST_METHOD0(GetURL, const GURL&()); |
133 MOCK_CONST_METHOD0(GetOriginalUrl, const GURL&()); | 133 MOCK_CONST_METHOD0(GetOriginalUrl, const GURL&()); |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 .WillOnce(Return()); | 682 .WillOnce(Return()); |
683 EXPECT_CALL(GetMockDownloadItem(3), Remove()) | 683 EXPECT_CALL(GetMockDownloadItem(3), Remove()) |
684 .Times(0); | 684 .Times(0); |
685 | 685 |
686 download_manager_->RemoveAllDownloads(); | 686 download_manager_->RemoveAllDownloads(); |
687 // Because we're mocking the download item, the Remove call doesn't | 687 // Because we're mocking the download item, the Remove call doesn't |
688 // result in them being removed from the DownloadManager list. | 688 // result in them being removed from the DownloadManager list. |
689 } | 689 } |
690 | 690 |
691 } // namespace content | 691 } // namespace content |
OLD | NEW |