| 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()
|
|
|
|
|