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

Unified Diff: chrome/test/pyautolib/pyauto.py

Issue 10388107: [chromeos] Fix Logout automation when no browser windows are present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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 | « chrome/test/functional/chromeos_login.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyauto.py
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index ce70de14a6c0c24ca2b1dbee9ee73e06f290a237..c04b30424020176d228a22e69bc4f66978ac0364 100755
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -4117,14 +4117,18 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
def Logout(self):
"""Log out from ChromeOS and wait for session_manager to come up.
- May return before logout is complete and
- gives no indication of success or failure.
- Should be logged in to work.
+ This is equivalent to pressing the 'Sign out' button from the
+ aura shell tray when logged in.
+
+ Should be logged in to work. Re-initializes the automation channel
+ after logout.
"""
assert self.GetLoginInfo()['is_logged_in'], \
'Trying to log out when already logged out.'
- assert self.WaitForSessionManagerRestart(
- lambda: self.ApplyAccelerator(IDC_EXIT)), \
+ def _SignOut():
+ cmd_dict = { 'command': 'SignOut' }
+ self._GetResultFromJSONRequest(cmd_dict, windex=None)
+ assert self.WaitForSessionManagerRestart(_SignOut), \
'Session manager did not restart after logout.'
self.__SetUp()
« no previous file with comments | « chrome/test/functional/chromeos_login.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698