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_METHOD2(OpenPath
,
30 void(const std::string
& path
, const OpenPathCallback
& callback
));
31 MOCK_METHOD4(RequestTcpPortAccess
,
33 const std::string
& interface
,
34 const dbus::FileDescriptor
& lifeline_fd
,
35 const ResultCallback
& callback
));
36 MOCK_METHOD4(RequestUdpPortAccess
,
38 const std::string
& interface
,
39 const dbus::FileDescriptor
& lifeline_fd
,
40 const ResultCallback
& callback
));
41 MOCK_METHOD3(ReleaseTcpPort
,
43 const std::string
& interface
,
44 const ResultCallback
& callback
));
45 MOCK_METHOD3(ReleaseUdpPort
,
47 const std::string
& interface
,
48 const ResultCallback
& callback
));
51 } // namespace chromeos
53 #endif // CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_