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_DISCOVERY_MDNS_MOCK_DNS_SD_REGISTRY_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_MDNS_MOCK_DNS_SD_REGISTRY_H_ |
| 7 |
| 8 #include "chrome/browser/media/router/discovery/mdns/dns_sd_registry.h" |
| 9 #include "testing/gmock/include/gmock/gmock.h" |
| 10 |
| 11 namespace media_router { |
| 12 |
| 13 class MockDnsSdRegistry : public DnsSdRegistry { |
| 14 public: |
| 15 explicit MockDnsSdRegistry(DnsSdObserver* observer); |
| 16 ~MockDnsSdRegistry() override; |
| 17 |
| 18 MOCK_METHOD1(AddObserver, void(DnsSdObserver* observer)); |
| 19 MOCK_METHOD1(RemoveObserver, void(DnsSdObserver* observer)); |
| 20 MOCK_METHOD1(RegisterDnsSdListener, void(const std::string& service_type)); |
| 21 MOCK_METHOD1(UnregisterDnsSdListener, void(const std::string& service_type)); |
| 22 MOCK_METHOD1(Publish, void(const std::string&)); |
| 23 MOCK_METHOD0(ForceDiscovery, void(void)); |
| 24 |
| 25 void DispatchMDnsEvent(const std::string& service_type, |
| 26 const DnsSdServiceList& services); |
| 27 |
| 28 private: |
| 29 DnsSdObserver* observer_; |
| 30 }; |
| 31 |
| 32 } // namespace media_router |
| 33 |
| 34 #endif // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_MDNS_MOCK_DNS_SD_REGISTRY_H_ |
OLD | NEW |