Merge lp:~aacid/unity-greeter/fake_error_remote_login into lp:unity-greeter

Proposed by Albert Astals Cid
Status: Merged
Merged at revision: 517
Proposed branch: lp:~aacid/unity-greeter/fake_error_remote_login
Merge into: lp:unity-greeter
Diff against target: 34 lines (+13/-3)
1 file modified
src/user-list.vala (+13/-3)
To merge this branch: bzr merge lp:~aacid/unity-greeter/fake_error_remote_login
Reviewer Review Type Date Requested Status
Unity Greeter Development Team Pending
Review via email: mp+120743@code.launchpad.net

Commit message

Do not talk with the greeter when on test mode

Just shortcut the authentication_complete_cb call like the other tests do
password is the valid password
delay has a delay of 5 sec before failing (so you can test esc, up/down arrows disabled, etc)

Description of the change

Do not talk with the greeter when on test mode

Just shortcut the authentication_complete_cb call like the other tests do
password is the valid password
delay has a delay of 5 sec before failing (so you can test esc, up/down arrows disabled, etc)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/user-list.vala'
2--- src/user-list.vala 2012-08-21 23:25:35 +0000
3+++ src/user-list.vala 2012-08-22 11:02:27 +0000
4@@ -408,9 +408,20 @@
5 sensitive = false;
6 will_clear = true;
7 greeter_authenticating_user = selected_entry.id;
8- UnityGreeter.greeter.authenticate ();
9- if (!UnityGreeter.test_mode)
10+ if (UnityGreeter.test_mode)
11+ {
12+ Gtk.Entry field = current_remote_fields.get("password") as Gtk.Entry;
13+ test_is_authenticated = field.text == "password";
14+ if (field.text == "delay")
15+ Timeout.add (5000, () => {authentication_complete_cb (); return false;});
16+ else
17+ authentication_complete_cb ();
18+ }
19+ else
20+ {
21+ UnityGreeter.greeter.authenticate ();
22 remote_login_service.set_last_used_server (currently_browsing_server_url, url_from_remote_loding_server_list_name (selected_entry.id));
23+ }
24 }
25
26 private bool change_background_timeout_cb ()
27@@ -838,7 +849,6 @@
28 Gtk.Entry field = current_remote_fields.get("password") as Gtk.Entry;
29 var answer = field != null ? field.text : "";
30 UnityGreeter.greeter.respond (answer);
31- test_is_authenticated = answer == "password";
32 }
33 else if (text == "url:")
34 {

Subscribers

People subscribed via source and target branches