619
619
const char * const error_key = "has-online-account-error";
620
620
const char * const show_name_key = "show-real-name-on-panel";
623
624
guint64 login_frequency;
624
625
const gchar * user_name;
625
626
const gchar * real_name;
626
627
} account_info[] = {
627
{ 134, "whartnell", "First Doctor" },
628
{ 119, "ptroughton", "Second Doctor" },
629
{ 128, "jpertwee", "Third Doctor" },
630
{ 172, "tbaker", "Fourth Doctor" },
631
{ 69, "pdavison", "Fifth Doctor" },
632
{ 31, "cbaker", "Sixth Doctor" },
633
{ 42, "smccoy", "Seventh Doctor" },
634
{ 1, "pmcgann", "Eigth Doctor" },
635
{ 13, "ceccleston", "Ninth Doctor" },
636
{ 47, "dtennant", "Tenth Doctor" },
637
{ 34, "msmith", "Eleventh Doctor" },
638
{ 1, "rhurndall", "First Doctor" }
628
{ 101, 134, "whartnell", "First Doctor" },
629
{ 102, 119, "ptroughton", "Second Doctor" },
630
{ 103, 128, "jpertwee", "Third Doctor" },
631
{ 104, 172, "tbaker", "Fourth Doctor" },
632
{ 105, 69, "pdavison", "Fifth Doctor" },
633
{ 106, 31, "cbaker", "Sixth Doctor" },
634
{ 107, 42, "smccoy", "Seventh Doctor" },
635
{ 108, 1, "pmcgann", "Eigth Doctor" },
636
{ 109, 13, "ceccleston", "Ninth Doctor" },
637
{ 110, 47, "dtennant", "Tenth Doctor" },
638
{ 111, 34, "msmith", "Eleventh Doctor" },
639
{ 201, 1, "rhurndall", "First Doctor" }
641
642
// Find the switcher menu model.
656
657
IndicatorSessionUser * u = g_new0 (IndicatorSessionUser, 1);
657
658
u->is_current_user = false;
658
659
u->is_logged_in = false;
660
u->uid = account_info[i].uid;
660
661
u->login_frequency = account_info[i].login_frequency;
661
662
u->user_name = g_strdup (account_info[i].user_name);
662
663
u->real_name = g_strdup (account_info[i].real_name);
663
indicator_session_users_mock_add_user (INDICATOR_SESSION_USERS_MOCK(mock_users), u->user_name, u);
664
indicator_session_users_mock_add_user (INDICATOR_SESSION_USERS_MOCK(mock_users), u);
749
750
u->login_frequency = account_info[i].login_frequency;
750
751
u->user_name = g_strdup (account_info[i].user_name);
751
752
u->real_name = g_strdup (account_info[i].real_name);
752
indicator_session_users_mock_add_user (INDICATOR_SESSION_USERS_MOCK(mock_users), u->user_name, u);
753
indicator_session_users_mock_add_user (INDICATOR_SESSION_USERS_MOCK(mock_users), u);
755
756
users[2]->is_current_user = false;
756
indicator_session_users_changed (mock_users, users[2]->user_name);
757
indicator_session_users_changed (mock_users, users[2]->uid);
757
758
users[10]->is_current_user = true;
758
759
users[10]->is_logged_in = true;
759
indicator_session_users_changed (mock_users, users[10]->user_name);
760
indicator_session_users_changed (mock_users, users[10]->uid);
760
761
wait_for_menu_resync ();
761
762
ASSERT_TRUE (find_menu_item_for_action ("indicator.switch-to-greeter", &switch_menu, &pos));
762
763
ASSERT_EQ (0, pos);