1 // Copyright 2015 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.
5 #ifndef CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_
6 #define CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_
8 #include "chromeos/dbus/permission_broker_client.h"
9 #include "testing/gmock/include/gmock/gmock.h"
17 class MockPermissionBrokerClient
: public PermissionBrokerClient
{
19 MockPermissionBrokerClient();
20 ~MockPermissionBrokerClient() override
;
22 MOCK_METHOD1(Init
, void(dbus::Bus
* bus
));
23 MOCK_METHOD2(CheckPathAccess
,
24 void(const std::string
& path
, const ResultCallback
& callback
));
25 MOCK_METHOD3(RequestPathAccess
,
26 void(const std::string
& path
,
28 const ResultCallback
& callback
));
29 MOCK_METHOD4(RequestTcpPortAccess
,
31 const std::string
& interface
,
32 const dbus::FileDescriptor
& lifeline_fd
,
33 const ResultCallback
& callback
));
34 MOCK_METHOD4(RequestUdpPortAccess
,
36 const std::string
& interface
,
37 const dbus::FileDescriptor
& lifeline_fd
,
38 const ResultCallback
& callback
));
39 MOCK_METHOD3(ReleaseTcpPort
,
41 const std::string
& interface
,
42 const ResultCallback
& callback
));
43 MOCK_METHOD3(ReleaseUdpPort
,
45 const std::string
& interface
,
46 const ResultCallback
& callback
));
49 } // namespace chromeos
51 #endif // CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_