aboutsummaryrefslogtreecommitdiff
path: root/tests/backend-dbus/test-actions.cc
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-02-14 11:27:04 +0100
committerRobert Tari <robert@tari.in>2023-02-14 11:27:04 +0100
commitcbafa7e6bfb85e85bb8e2eaef102dcca5c76deab (patch)
treeedbaa4c0de4c25d7e6ba5f2db9f46b819b6e6699 /tests/backend-dbus/test-actions.cc
parentf9d1e0d63e454dbd280342ea42aa741d7a6a2003 (diff)
parent8c4df6215a986695edc6c6530f6d6388ea9640d5 (diff)
downloadayatana-indicator-session-cbafa7e6bfb85e85bb8e2eaef102dcca5c76deab.tar.gz
ayatana-indicator-session-cbafa7e6bfb85e85bb8e2eaef102dcca5c76deab.tar.bz2
ayatana-indicator-session-cbafa7e6bfb85e85bb8e2eaef102dcca5c76deab.zip
Merge branch 'sunweaver-pr/full-lomiri-integration'
Attributes GH PR #83: https://github.com/AyatanaIndicators/ayatana-indicator-session/pull/83
Diffstat (limited to 'tests/backend-dbus/test-actions.cc')
-rw-r--r--tests/backend-dbus/test-actions.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/backend-dbus/test-actions.cc b/tests/backend-dbus/test-actions.cc
index 709273a..bced3e9 100644
--- a/tests/backend-dbus/test-actions.cc
+++ b/tests/backend-dbus/test-actions.cc
@@ -263,10 +263,10 @@ TEST_F (Actions, PowerOff)
g_settings_reset (indicator_settings, SUPPRESS_KEY);
}
-TEST_F (Actions, LogoutUnity)
+TEST_F (Actions, LogoutLomiri)
{
- MockUnitySession desktop_session(loop, conn);
- ASSERT_EQ (MockUnitySession::None, desktop_session.last_action());
+ MockLomiriSession lomiri_session(loop, conn);
+ ASSERT_EQ (MockLomiriSession::None, lomiri_session.last_action());
wait_msec();
// confirm that user is prompted
@@ -276,7 +276,7 @@ TEST_F (Actions, LogoutUnity)
ASSERT_TRUE (end_session_dialog->is_open());
end_session_dialog->cancel();
wait_msec (50);
- ASSERT_EQ (MockUnitySession::None, desktop_session.last_action());
+ ASSERT_EQ (MockLomiriSession::None, lomiri_session.last_action());
// confirm that user is prompted
// and that logout is called when user confirms the logout dialog
@@ -285,19 +285,19 @@ TEST_F (Actions, LogoutUnity)
ASSERT_TRUE (end_session_dialog->is_open ());
end_session_dialog->confirm_logout ();
wait_msec (100);
- ASSERT_EQ (MockUnitySession::RequestLogout, desktop_session.last_action());
+ ASSERT_EQ (MockLomiriSession::RequestLogout, lomiri_session.last_action());
// confirm that we try to call SessionManager::LogoutQuet
// when prompts are disabled
login1_manager->clear_last_action ();
- desktop_session.clear_last_action ();
+ lomiri_session.clear_last_action ();
ASSERT_EQ ("", login1_manager->last_action());
- ASSERT_EQ (MockUnitySession::None, desktop_session.last_action ());
+ ASSERT_EQ (MockLomiriSession::None, lomiri_session.last_action ());
g_settings_set_boolean (indicator_settings, SUPPRESS_KEY, TRUE);
wait_msec (50);
indicator_session_actions_logout (actions);
wait_msec (50);
- ASSERT_EQ (MockUnitySession::RequestLogout, desktop_session.last_action ());
+ ASSERT_EQ (MockLomiriSession::RequestLogout, lomiri_session.last_action ());
g_settings_reset (indicator_settings, SUPPRESS_KEY);
}
@@ -356,29 +356,29 @@ TEST_F (Actions, Hibernate)
TEST_F (Actions, SwitchToScreensaver)
{
- MockUnitySession desktop_session(loop, conn);
+ MockLomiriSession lomiri_session(loop, conn);
- ASSERT_EQ (MockUnitySession::None, desktop_session.last_action());
+ ASSERT_EQ (MockLomiriSession::None, lomiri_session.last_action());
indicator_session_actions_switch_to_screensaver (actions);
wait_msec (50);
- ASSERT_EQ (MockUnitySession::Lock, desktop_session.last_action());
+ ASSERT_EQ (MockLomiriSession::Lock, lomiri_session.last_action());
}
TEST_F (Actions, SwitchToGreeter)
{
- MockUnitySession desktop_session(loop, conn);
+ MockLomiriSession lomiri_session(loop, conn);
ASSERT_NE (MockDisplayManagerSeat::GREETER, dm_seat->last_action());
- ASSERT_EQ (MockUnitySession::None, desktop_session.last_action());
+ ASSERT_EQ (MockLomiriSession::None, lomiri_session.last_action());
indicator_session_actions_switch_to_greeter (actions);
wait_msec (50);
- ASSERT_EQ (MockUnitySession::PromptLock, desktop_session.last_action());
+ ASSERT_EQ (MockLomiriSession::PromptLock, lomiri_session.last_action());
ASSERT_EQ (MockDisplayManagerSeat::GREETER, dm_seat->last_action());
}
TEST_F (Actions, SwitchToGuest)
{
- MockUnitySession desktop_session(loop, conn);
+ MockLomiriSession lomiri_session(loop, conn);
// allow guests
dm_seat->set_guest_allowed (true);
@@ -394,12 +394,12 @@ TEST_F (Actions, SwitchToGuest)
wait_for_signal (login1_seat->skeleton(), "notify::active-session");
ASSERT_EQ (guest_session_tag, login1_seat->active_session());
wait_msec (50);
- ASSERT_EQ (MockUnitySession::PromptLock, desktop_session.last_action());
+ ASSERT_EQ (MockLomiriSession::PromptLock, lomiri_session.last_action());
}
TEST_F (Actions, SwitchToUsername)
{
- MockUnitySession desktop_session(loop, conn);
+ MockLomiriSession lomiri_session(loop, conn);
const char * const dr1_username = "whartnell";
const char * const dr2_username = "ptroughton";
MockUser * dr1_user;
@@ -417,7 +417,7 @@ TEST_F (Actions, SwitchToUsername)
wait_for_signal (login1_seat->skeleton(), "notify::active-session");
ASSERT_EQ (dr1_session, login1_seat->active_session());
wait_msec (50);
- ASSERT_EQ (MockUnitySession::PromptLock, desktop_session.last_action());
+ ASSERT_EQ (MockLomiriSession::PromptLock, lomiri_session.last_action());
indicator_session_actions_switch_to_username (actions, dr2_username);
wait_for_signal (login1_seat->skeleton(), "notify::active-session");