Index: client/bin/site_login.py |
diff --git a/client/bin/site_login.py b/client/bin/site_login.py |
index 9df2a54a9c7397ae521ab1c3920bc86fe480a8ee..44ed002785a71d40d9265e597b1409fe80b11144 100644 |
--- a/client/bin/site_login.py |
+++ b/client/bin/site_login.py |
@@ -293,11 +293,15 @@ def refresh_login_screen(timeout=_DEFAULT_TIMEOUT): |
raise UnexpectedCondition('Already logged in') |
wait_for_browser() |
wait_for_login_prompt() |
+ oldpid = __get_session_manager_pid() |
try: |
os.unlink(chromeos_constants.LOGIN_PROMPT_READY_MAGIC_FILE) |
except OSError, e: |
if e.errno != errno.ENOENT: |
raise e |
- nuke_process_by_name(chromeos_constants.BROWSER, with_prejudice=True) |
- wait_for_browser() |
+ nuke_login_manager() |
+ site_utils.poll_for_condition( |
+ lambda: __session_manager_restarted(oldpid), |
+ TimeoutError('Timed out waiting for logout'), |
+ timeout) |
wait_for_login_prompt() |