| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 MOCK_METHOD0(CanOpenDownload, bool()); | 99 MOCK_METHOD0(CanOpenDownload, bool()); |
| 100 MOCK_METHOD0(ShouldOpenFileBasedOnExtension, bool()); | 100 MOCK_METHOD0(ShouldOpenFileBasedOnExtension, bool()); |
| 101 MOCK_METHOD0(OpenDownload, void()); | 101 MOCK_METHOD0(OpenDownload, void()); |
| 102 MOCK_METHOD0(ShowDownloadInShell, void()); | 102 MOCK_METHOD0(ShowDownloadInShell, void()); |
| 103 MOCK_METHOD0(ValidateDangerousDownload, void()); | 103 MOCK_METHOD0(ValidateDangerousDownload, void()); |
| 104 MOCK_METHOD1(StealDangerousDownload, void(const AcquireFileCallback&)); | 104 MOCK_METHOD1(StealDangerousDownload, void(const AcquireFileCallback&)); |
| 105 MOCK_METHOD3(UpdateProgress, void(int64, int64, const std::string&)); | 105 MOCK_METHOD3(UpdateProgress, void(int64, int64, const std::string&)); |
| 106 MOCK_METHOD1(Cancel, void(bool)); | 106 MOCK_METHOD1(Cancel, void(bool)); |
| 107 MOCK_METHOD0(MarkAsComplete, void()); | 107 MOCK_METHOD0(MarkAsComplete, void()); |
| 108 MOCK_METHOD1(OnAllDataSaved, void(const std::string&)); | 108 MOCK_METHOD1(OnAllDataSaved, void(const std::string&)); |
| 109 MOCK_METHOD1(OnDownloadedFileRemoved, void(bool)); | 109 MOCK_METHOD0(OnDownloadedFileRemoved, void()); |
| 110 virtual void Start( | 110 virtual void Start( |
| 111 scoped_ptr<DownloadFile> download_file, | 111 scoped_ptr<DownloadFile> download_file, |
| 112 scoped_ptr<DownloadRequestHandleInterface> req_handle) OVERRIDE { | 112 scoped_ptr<DownloadRequestHandleInterface> req_handle) OVERRIDE { |
| 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*)); |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 .WillOnce(Return()); | 692 .WillOnce(Return()); |
| 693 EXPECT_CALL(GetMockDownloadItem(3), Remove()) | 693 EXPECT_CALL(GetMockDownloadItem(3), Remove()) |
| 694 .Times(0); | 694 .Times(0); |
| 695 | 695 |
| 696 download_manager_->RemoveAllDownloads(); | 696 download_manager_->RemoveAllDownloads(); |
| 697 // Because we're mocking the download item, the Remove call doesn't | 697 // Because we're mocking the download item, the Remove call doesn't |
| 698 // result in them being removed from the DownloadManager list. | 698 // result in them being removed from the DownloadManager list. |
| 699 } | 699 } |
| 700 | 700 |
| 701 } // namespace content | 701 } // namespace content |
| OLD | NEW |