Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(996)

Unified Diff: client/cros/login.py

Issue 6602035: [autotest] Wait for ownership during CryptohomeMounted test (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cros/login.py
diff --git a/client/cros/login.py b/client/cros/login.py
index af582d8eabb2237f458da6f326a4cac1cab66f07..69e8b6a2d45fdde1cb74ff131ee3966816e5c4c6 100644
--- a/client/cros/login.py
+++ b/client/cros/login.py
@@ -154,24 +154,24 @@ def attempt_login(username, password, timeout=_DEFAULT_TIMEOUT):
# press and key release events.
utils.system('renice +%d -p %d' % (_LOGIN_NICE, os.getpid()))
try:
- ax = cros_ui.get_autox()
- # navigate to login screen
- ax.send_hotkey("Ctrl+Alt+L")
- # escape out of any login screen menus (e.g., the network selection menu)
- ax.send_hotkey("Escape")
- time.sleep(0.5)
- if (username):
- # focus username
- ax.send_hotkey("Alt+U")
- ax.send_text(username)
- # focus password
- ax.send_hotkey("Alt+P")
- ax.send_text(password)
- ax.send_hotkey("Return")
- else:
- ax.send_hotkey("Alt+B") # Browse without signing-in
+ ax = cros_ui.get_autox()
+ # navigate to login screen
+ ax.send_hotkey("Ctrl+Alt+L")
+ # escape out of any login screen menus (e.g., the network select menu)
+ ax.send_hotkey("Escape")
+ time.sleep(0.5)
+ if (username):
+ # focus username
+ ax.send_hotkey("Alt+U")
+ ax.send_text(username)
+ # focus password
+ ax.send_hotkey("Alt+P")
+ ax.send_text(password)
+ ax.send_hotkey("Return")
+ else:
+ ax.send_hotkey("Alt+B") # Browse without signing-in
finally:
- utils.system('renice -%d -p %d' % (_LOGIN_NICE, os.getpid()))
+ utils.system('renice -%d -p %d' % (_LOGIN_NICE, os.getpid()))
wait_for_condition(condition=logged_in,
timeout_msg='Timed out waiting for login',
@@ -179,6 +179,7 @@ def attempt_login(username, password, timeout=_DEFAULT_TIMEOUT):
process='chrome',
log_reader=log_reader,
crash_msg='Chrome crashed during login')
+ wait_for_ownership() # Otherwise we SIGABRT keygen
def attempt_logout(timeout=_DEFAULT_TIMEOUT):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698