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

Unified Diff: client/bin/site_login.py

Issue 1234004: Add control test for login_CryptohomeMounted (Closed)
Patch Set: Fix spacing, comments per gauravsh Created 10 years, 9 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 | client/site_tests/login_CryptohomeMounted/control » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/bin/site_login.py
diff --git a/client/bin/site_login.py b/client/bin/site_login.py
index 0da53494877d5728adb524d33a4be3c519615437..7d212fc582bbaf25e26dd9071e379c159f9feda2 100644
--- a/client/bin/site_login.py
+++ b/client/bin/site_login.py
@@ -20,7 +20,7 @@ def logged_in():
return os.path.exists(chromeos_constants.LOGGED_IN_MAGIC_FILE)
-def attempt_login(test, script_file, timeout = 10):
+def attempt_login(test, script_file, timeout=10):
dep = 'autox'
dep_dir = os.path.join(test.autodir, 'deps', dep)
test.job.install_pkg(dep, 'dep', dep_dir)
@@ -44,9 +44,9 @@ def attempt_login(test, script_file, timeout = 10):
return True
-def attempt_logout(timeout = 10):
+def attempt_logout(timeout=10):
# Gracefully exiting chrome causes the user's session to end.
- utils.system('pkill -TERM ^%s$' % chromeos_constants.BROWSER)
+ utils.system('pkill -TERM -o ^%s$' % chromeos_constants.BROWSER)
start_time = time.time()
while time.time() - start_time < timeout:
if not logged_in():
@@ -57,7 +57,7 @@ def attempt_logout(timeout = 10):
return True
-def wait_for_browser(timeout = 10):
+def wait_for_browser(timeout=10):
# Wait until the login manager is back up before trying to use it.
# I don't use utils.system here because I don't want to fail
# if pgrep returns non-zero, I just want to wait and try again.
@@ -71,7 +71,7 @@ def wait_for_browser(timeout = 10):
return True
-def wait_for_screensaver(timeout = 10, raise_error = True):
+def wait_for_screensaver(timeout=10, raise_error=True):
# Wait until the screensaver starts
start_time = time.time()
while time.time() - start_time < timeout:
« no previous file with comments | « no previous file | client/site_tests/login_CryptohomeMounted/control » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698