1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_DBUS_MOCK_SESSION_MANAGER_CLIENT_H_
#define CHROMEOS_DBUS_MOCK_SESSION_MANAGER_CLIENT_H_
#include <string>
#include "chromeos/dbus/session_manager_client.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace chromeos {
class MockSessionManagerClient : public SessionManagerClient {
public:
MockSessionManagerClient();
virtual ~MockSessionManagerClient();
MOCK_METHOD1(Init, void(dbus::Bus* bus));
MOCK_METHOD1(AddObserver, void(Observer*));
MOCK_METHOD1(RemoveObserver, void(Observer*));
MOCK_METHOD1(HasObserver, bool(Observer*));
MOCK_METHOD0(EmitLoginPromptReady, void(void));
MOCK_METHOD0(EmitLoginPromptVisible, void(void));
MOCK_METHOD2(RestartJob, void(int, const std::string&));
MOCK_METHOD1(StartSession, void(const std::string&));
MOCK_METHOD0(StopSession, void(void));
MOCK_METHOD0(StartDeviceWipe, void(void));
MOCK_METHOD0(RequestLockScreen, void(void));
MOCK_METHOD0(NotifyLockScreenShown, void(void));
MOCK_METHOD0(NotifyLockScreenDismissed, void(void));
MOCK_METHOD1(RetrieveActiveSessions, void(const ActiveSessionsCallback&));
MOCK_METHOD1(RetrieveDevicePolicy, void(const RetrievePolicyCallback&));
MOCK_METHOD2(RetrievePolicyForUser,
void(const std::string&,
const RetrievePolicyCallback&));
MOCK_METHOD1(BlockingRetrievePolicyForUser, std::string(const std::string&));
MOCK_METHOD2(RetrieveDeviceLocalAccountPolicy,
void(const std::string&,
const RetrievePolicyCallback&));
MOCK_METHOD2(StoreDevicePolicy,
void(const std::string&,
const StorePolicyCallback&));
MOCK_METHOD4(StorePolicyForUser,
void(const std::string&,
const std::string&,
const std::string&,
const StorePolicyCallback&));
MOCK_METHOD3(StoreDeviceLocalAccountPolicy,
void(const std::string&,
const std::string&,
const StorePolicyCallback&));
MOCK_METHOD2(SetFlagsForUser,
void(const std::string&,
const std::vector<std::string>&));
};
} // namespace chromeos
#endif // CHROMEOS_DBUS_MOCK_SESSION_MANAGER_CLIENT_H_
|