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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
ash / public / cpp / test / mock_session_controller.h [blame]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_PUBLIC_CPP_TEST_MOCK_SESSION_CONTROLLER_H_
#define ASH_PUBLIC_CPP_TEST_MOCK_SESSION_CONTROLLER_H_
#include <cstdint>
#include <optional>
#include <string>
#include <vector>
#include "ash/public/cpp/session/session_controller.h"
#include "base/functional/callback.h"
#include "base/time/time.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace ash {
class MockSessionController : public ash::SessionController {
public:
MockSessionController();
MockSessionController(const MockSessionController&) = delete;
MockSessionController& operator=(const MockSessionController&) = delete;
~MockSessionController() override;
// SessionController:
MOCK_METHOD(void, SetClient, (SessionControllerClient * client), (override));
MOCK_METHOD(void, SetSessionInfo, (const SessionInfo& info), (override));
MOCK_METHOD(void,
UpdateUserSession,
(const UserSession& user_session),
(override));
MOCK_METHOD(void,
SetUserSessionOrder,
(const std::vector<uint32_t>& user_session_ids),
(override));
MOCK_METHOD(void,
PrepareForLock,
(PrepareForLockCallback callback),
(override));
MOCK_METHOD(void, StartLock, (StartLockCallback callback), (override));
MOCK_METHOD(void, NotifyChromeLockAnimationsComplete, (), (override));
MOCK_METHOD(void,
RunUnlockAnimation,
(RunUnlockAnimationCallback callback),
(override));
MOCK_METHOD(void, NotifyChromeTerminating, (), (override));
MOCK_METHOD(void,
SetSessionLengthLimit,
(base::TimeDelta length_limit, base::Time start_time),
(override));
MOCK_METHOD(void,
CanSwitchActiveUser,
(CanSwitchActiveUserCallback callback),
(override));
MOCK_METHOD(void,
ShowMultiprofilesIntroDialog,
(ShowMultiprofilesIntroDialogCallback callback),
(override));
MOCK_METHOD(void,
ShowTeleportWarningDialog,
(ShowTeleportWarningDialogCallback callback),
(override));
MOCK_METHOD(void,
ShowMultiprofilesSessionAbortedDialog,
(const std::string& user_email),
(override));
MOCK_METHOD(void,
AddSessionActivationObserverForAccountId,
(const AccountId& account_id,
SessionActivationObserver* observer),
(override));
MOCK_METHOD(void,
RemoveSessionActivationObserverForAccountId,
(const AccountId& account_id,
SessionActivationObserver* observer),
(override));
MOCK_METHOD(void, AddObserver, (SessionObserver * observer), (override));
MOCK_METHOD(void, RemoveObserver, (SessionObserver * observer), (override));
MOCK_METHOD(bool, IsScreenLocked, (), (const, override));
MOCK_METHOD(std::optional<int>, GetExistingUsersCount, (), (const, override));
MOCK_METHOD(void, NotifyFirstSessionReady, (), (override));
MOCK_METHOD(void, NotifyUserToBeRemoved, (const AccountId&), (override));
};
} // namespace ash
#endif // ASH_PUBLIC_CPP_TEST_MOCK_SESSION_CONTROLLER_H_