diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-06-24 17:08:53 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-06-24 17:08:53 -0500 |
commit | 889f876ae7263bde2fb54b69930d1d31cbad8423 (patch) | |
tree | 1893a1acbdaa77db6fc597d015795880f037df8f | |
parent | 1b73a52e6a30b9217cdddc7b6f166a421613eaf6 (diff) | |
download | ayatana-indicator-session-889f876ae7263bde2fb54b69930d1d31cbad8423.tar.gz ayatana-indicator-session-889f876ae7263bde2fb54b69930d1d31cbad8423.tar.bz2 ayatana-indicator-session-889f876ae7263bde2fb54b69930d1d31cbad8423.zip |
in the tests, use login1's terminology 'power off', 'reboot'
-rw-r--r-- | tests/backend-mock-actions.c | 12 | ||||
-rw-r--r-- | tests/test-service.cc | 28 |
2 files changed, 20 insertions, 20 deletions
diff --git a/tests/backend-mock-actions.c b/tests/backend-mock-actions.c index 121c7ba..d5a506b 100644 --- a/tests/backend-mock-actions.c +++ b/tests/backend-mock-actions.c @@ -80,15 +80,15 @@ my_hibernate (IndicatorSessionActions * self G_GNUC_UNUSED) } static void -my_restart (IndicatorSessionActions * self G_GNUC_UNUSED) +my_reboot (IndicatorSessionActions * self G_GNUC_UNUSED) { - g_settings_set_string (mock_settings, "last-command", "restart"); + g_settings_set_string (mock_settings, "last-command", "reboot"); } static void -my_shutdown (IndicatorSessionActions * self G_GNUC_UNUSED) +my_power_off (IndicatorSessionActions * self G_GNUC_UNUSED) { - g_settings_set_string (mock_settings, "last-command", "shutdown"); + g_settings_set_string (mock_settings, "last-command", "power-off"); } static void @@ -185,8 +185,8 @@ indicator_session_actions_mock_class_init (IndicatorSessionActionsMockClass * kl actions_class->logout = my_logout; actions_class->suspend = my_suspend; actions_class->hibernate = my_hibernate; - actions_class->restart = my_restart; - actions_class->shutdown = my_shutdown; + actions_class->reboot = my_reboot; + actions_class->power_off = my_power_off; actions_class->settings = my_settings; actions_class->help = my_help; actions_class->about = my_about; diff --git a/tests/test-service.cc b/tests/test-service.cc index 57b4221..2d81441 100644 --- a/tests/test-service.cc +++ b/tests/test-service.cc @@ -374,14 +374,14 @@ TEST_F (ServiceTest, Logout) test_simple_action ("logout"); } -TEST_F (ServiceTest, Shutdown) +TEST_F (ServiceTest, PowerOff) { - test_simple_action ("shutdown"); + test_simple_action ("power-off"); } -TEST_F (ServiceTest, Restart) +TEST_F (ServiceTest, Reboot) { - test_simple_action ("restart"); + test_simple_action ("reboot"); } TEST_F (ServiceTest, SwitchToScreensaver) @@ -477,8 +477,8 @@ TEST_F (ServiceTest, ConfirmationDisabledByBackend) // confirm that the ellipsis are correct ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.switch-to-greeter")); ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.logout")); - ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.restart")); - ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.shutdown")); + ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.reboot")); + ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.power-off")); // now toggle the can-prompt flag confirm_supported = !confirm_supported; @@ -490,8 +490,8 @@ TEST_F (ServiceTest, ConfirmationDisabledByBackend) // confirm that the ellipsis are correct ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.switch-to-greeter")); ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.logout")); - ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.restart")); - ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.shutdown")); + ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.reboot")); + ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.power-off")); // cleanup g_settings_reset (mock_settings, confirm_supported_key); @@ -509,8 +509,8 @@ TEST_F (ServiceTest, ConfirmationDisabledByUser) // confirm that the ellipsis are correct ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.switch-to-greeter")); ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.logout")); - ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.restart")); - ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.shutdown")); + ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.reboot")); + ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.power-off")); // now toggle the can-prompt flag confirm_disabled = !confirm_disabled; @@ -522,8 +522,8 @@ TEST_F (ServiceTest, ConfirmationDisabledByUser) // confirm that the ellipsis are correct ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.switch-to-greeter")); ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.logout")); - ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.restart")); - ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.shutdown")); + ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.reboot")); + ASSERT_EQ (confirm, action_menuitem_label_is_ellipsized ("indicator.power-off")); // cleanup g_settings_reset (indicator_settings, confirm_disabled_key); @@ -542,8 +542,8 @@ TEST_F (ServiceTest, DefaultMenuItems) ASSERT_TRUE (find_menu_item_for_action ("indicator.logout", NULL, NULL)); ASSERT_TRUE (find_menu_item_for_action ("indicator.suspend", NULL, NULL)); ASSERT_TRUE (find_menu_item_for_action ("indicator.hibernate", NULL, NULL)); - ASSERT_TRUE (find_menu_item_for_action ("indicator.restart", NULL, NULL)); - ASSERT_TRUE (find_menu_item_for_action ("indicator.shutdown", NULL, NULL)); + ASSERT_TRUE (find_menu_item_for_action ("indicator.reboot", NULL, NULL)); + ASSERT_TRUE (find_menu_item_for_action ("indicator.power-off", NULL, NULL)); } TEST_F (ServiceTest, OnlineAccountError) |