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 CHROME_BROWSER_MEDIA_ROUTER_MOCK_DEVICE_DESCRIPTION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOCK_DEVICE_DESCRIPTION_SERVICE_H_ |
| 7 |
| 8 #include "chrome/browser/media/router/device_description_service.h" |
| 9 #include "testing/gmock/include/gmock/gmock.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 |
| 12 namespace media_router { |
| 13 |
| 14 class MockDeviceDescriptionServiceObserver |
| 15 : public DeviceDescriptionService::Observer { |
| 16 public: |
| 17 MockDeviceDescriptionServiceObserver(); |
| 18 ~MockDeviceDescriptionServiceObserver() override; |
| 19 |
| 20 MOCK_METHOD2(OnDeviceDescriptionAvailable, |
| 21 void(const std::string& device_id, |
| 22 const DialDeviceDescription& description)); |
| 23 |
| 24 MOCK_METHOD2(OnDeviceDescriptionFetchError, |
| 25 void(const std::string& device_id, |
| 26 const std::string& error_message)); |
| 27 }; |
| 28 |
| 29 class MockDeviceDescriptionService : public DeviceDescriptionService { |
| 30 public: |
| 31 explicit MockDeviceDescriptionService( |
| 32 DeviceDescriptionService::Observer* observer); |
| 33 ~MockDeviceDescriptionService() override; |
| 34 |
| 35 MOCK_METHOD3(GetDeviceDescription, |
| 36 bool(const DialDeviceData& device, |
| 37 net::URLRequestContextGetter* request_context, |
| 38 DialDeviceDescription* out_description)); |
| 39 |
| 40 MOCK_METHOD1(MayStopDeviceDescriptionFetching, |
| 41 bool(const std::string& device_label)); |
| 42 |
| 43 MOCK_METHOD3(CheckAccess, |
| 44 void(const GURL& device_description_url, |
| 45 net::URLRequestContextGetter* request_context, |
| 46 const CheckAccessCallback& check_access_cb)); |
| 47 }; |
| 48 |
| 49 } // namespace media_router |
| 50 |
| 51 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOCK_DEVICE_DESCRIPTION_SERVICE_H_ |
OLD | NEW |