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

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

Issue 1363002: Add session object so that we have one class that control logged in session (Closed)
Patch Set: Fix comments 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
Index: client/site_tests/desktopui_DoLogin/desktopui_DoLogin.py
diff --git a/client/site_tests/desktopui_DoLogin/desktopui_DoLogin.py b/client/site_tests/desktopui_DoLogin/desktopui_DoLogin.py
index bbac605143919cae4183e1c0a09966b587dbff76..487bba644190cbade866d5f25aa944026cda283a 100644
--- a/client/site_tests/desktopui_DoLogin/desktopui_DoLogin.py
+++ b/client/site_tests/desktopui_DoLogin/desktopui_DoLogin.py
@@ -2,30 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import os, time
-from autotest_lib.client.bin import site_login, test
-from autotest_lib.client.common_lib import error
+import time
+from autotest_lib.client.bin import site_ui_test
-class desktopui_DoLogin(test.test):
+class desktopui_DoLogin(site_ui_test.UITest):
version = 1
+
- def setup(self):
- site_login.setup_autox(self)
-
- def run_once(self, script):
- logged_in = site_login.logged_in()
-
- # Can't test login while logged in, so logout.
- if logged_in:
- if not site_login.attempt_logout():
- raise error.TestFail('Could not terminate existing session')
- if not site_login.wait_for_login_manager():
- raise error.TestFail("Login manager didn't come back")
-
- # Test account information embedded into json file.
- if not site_login.attempt_login(self, script):
- raise error.TestFail('Could not login')
-
- # If we started logged out, log back out.
- if not logged_in:
- site_login.attempt_logout()
+ def run_once(self):
+ time.sleep(10) # Local login is so fast, it needs to be slowed down.
kmixter1 2010/03/26 02:38:45 Adding the blocking call to the constructor should

Powered by Google App Engine
This is Rietveld 408576698