| 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 COMPONENTS_DOWNLOAD_INTERNAL_TEST_MOCK_CLIENT_H_ |
| 6 #define COMPONENTS_DOWNLOAD_INTERNAL_TEST_MOCK_CLIENT_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "components/download/public/client.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" |
| 11 |
| 12 namespace download { |
| 13 namespace test { |
| 14 |
| 15 class MockClient : public Client { |
| 16 public: |
| 17 MockClient(); |
| 18 ~MockClient() override; |
| 19 |
| 20 // Client implementation. |
| 21 MOCK_METHOD1(OnServiceInitialized, void(const std::vector<std::string>&)); |
| 22 MOCK_METHOD3( |
| 23 OnDownloadStarted, |
| 24 ShouldDownload(const std::string&, |
| 25 const std::vector<GURL>&, |
| 26 const scoped_refptr<const net::HttpResponseHeaders>&)); |
| 27 MOCK_METHOD2(OnDownloadUpdated, void(const std::string&, uint64_t)); |
| 28 MOCK_METHOD1(OnDownloadFailed, void(const std::string&)); |
| 29 MOCK_METHOD1(OnDownloadTimedOut, void(const std::string&)); |
| 30 MOCK_METHOD1(OnDownloadAborted, void(const std::string&)); |
| 31 MOCK_METHOD3(OnDownloadSucceeded, |
| 32 void(const std::string&, const base::FilePath&, uint64_t)); |
| 33 |
| 34 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(MockClient); |
| 36 }; |
| 37 |
| 38 } // namespace test |
| 39 } // namespace download |
| 40 |
| 41 #endif // COMPONENTS_DOWNLOAD_INTERNAL_TEST_MOCK_CLIENT_H_ |
| OLD | NEW |