| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_JOB_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_JOB_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "content/browser/download/download_job.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 |
| 15 namespace content { |
| 16 |
| 17 class MockDownloadJob : public DownloadJob { |
| 18 public: |
| 19 MockDownloadJob(); |
| 20 ~MockDownloadJob() override; |
| 21 |
| 22 // DownloadJob implementation. |
| 23 MOCK_METHOD1(Cancel, void(bool)); |
| 24 MOCK_METHOD0(Pause, void()); |
| 25 MOCK_METHOD0(Resume, void()); |
| 26 MOCK_CONST_METHOD0(CanOpen, bool()); |
| 27 MOCK_CONST_METHOD0(CanResume, bool()); |
| 28 MOCK_CONST_METHOD0(CanShowInFolder, bool()); |
| 29 MOCK_CONST_METHOD0(IsActive, bool()); |
| 30 MOCK_CONST_METHOD0(IsPause, bool()); |
| 31 MOCK_CONST_METHOD0(PercentComplete, int()); |
| 32 MOCK_CONST_METHOD0(CurrentSpeed, int64_t()); |
| 33 MOCK_CONST_METHOD1(TimeRemaining, bool(base::TimeDelta* remaining)); |
| 34 MOCK_CONST_METHOD0(GetWebContents, WebContents*()); |
| 35 MOCK_CONST_METHOD1(DebugString, std::string(bool)); |
| 36 }; |
| 37 |
| 38 } // namespace content |
| 39 |
| 40 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_JOB_H_ |
| OLD | NEW |