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

Unified Diff: client/site_tests/login_CryptohomeUnmounted/login_CryptohomeUnmounted.py

Issue 1534001: switch to autox.py and robustify login/logout code (Closed)
Patch Set: merge with head Created 10 years, 8 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
Index: client/site_tests/login_CryptohomeUnmounted/login_CryptohomeUnmounted.py
diff --git a/client/site_tests/login_CryptohomeUnmounted/login_CryptohomeUnmounted.py b/client/site_tests/login_CryptohomeUnmounted/login_CryptohomeUnmounted.py
index 4fbca86f3e66400b3c29a9cc176859e4fedb5b33..10c3bf77538af2a2300bc43fcf70fa7ed7b72a2f 100644
--- a/client/site_tests/login_CryptohomeUnmounted/login_CryptohomeUnmounted.py
+++ b/client/site_tests/login_CryptohomeUnmounted/login_CryptohomeUnmounted.py
@@ -3,32 +3,18 @@
# found in the LICENSE file.
import os, time
-from autotest_lib.client.bin import site_cryptohome, site_login, test
+from autotest_lib.client.bin import site_cryptohome, site_ui_test
from autotest_lib.client.common_lib import error
-class login_CryptohomeUnmounted(test.test):
+class login_CryptohomeUnmounted(site_ui_test.UITest):
version = 1
- def setup(self):
- site_login.setup_autox(self)
-
- def run_once(self, script = 'autox_script.json', is_control = False):
- logged_in = site_login.logged_in()
-
- # Require that the cryptohome is mounted before testing that
- # logging out will unmount it. This requires logging in.
- if not logged_in:
- site_login.attempt_login(self, script)
-
+ def run_once(self, is_control=False):
if not site_cryptohome.is_mounted(allow_fail = is_control):
raise error.TestFail('Expected cryptohome to be mounted')
- site_login.attempt_logout()
+ self.logout()
# allow the command to fail, so we can handle the error here
if site_cryptohome.is_mounted(allow_fail = True):
raise error.TestFail('Expected cryptohome NOT to be mounted')
-
- # If we started logged in, reset the state.
- if logged_in:
- site_login.attempt_login(self, script)

Powered by Google App Engine
This is Rietveld 408576698