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

Side by Side Diff: client/bin/site_login.py

Issue 3754009: [autotest] remove ownership state, THEN restart the browser (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | client/bin/site_ui_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import errno, logging, os, re, utils, signal, subprocess, time 5 import errno, logging, os, re, utils, signal, subprocess, time
6 from autotest_lib.client.bin import chromeos_constants, site_cryptohome 6 from autotest_lib.client.bin import chromeos_constants, site_cryptohome
7 from autotest_lib.client.bin import site_utils, test 7 from autotest_lib.client.bin import site_utils, test
8 from autotest_lib.client.common_lib import error, log_watcher, site_ui 8 from autotest_lib.client.common_lib import error, log_watcher, site_ui
9 9
10 _DEFAULT_TIMEOUT = 60 10 _DEFAULT_TIMEOUT = 60
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 wid2 = ax.get_top_window_id_at_point(x / 2, y / 2) 69 wid2 = ax.get_top_window_id_at_point(x / 2, y / 2)
70 if wid == wid2: 70 if wid == wid2:
71 return False 71 return False
72 72
73 return True 73 return True
74 74
75 return False 75 return False
76 76
77 77
78 def logged_in(): 78 def logged_in():
79 if (not os.path.exists(chromeos_constants.LOGGED_IN_MAGIC_FILE)):
80 logging.debug(chromeos_constants.LOGGED_IN_MAGIC_FILE + " no exist")
81 # this file is created when the session_manager emits start-user-session 79 # this file is created when the session_manager emits start-user-session
82 # and removed when the session_manager emits stop-user-session 80 # and removed when the session_manager emits stop-user-session
83 return os.path.exists(chromeos_constants.LOGGED_IN_MAGIC_FILE) 81 return os.path.exists(chromeos_constants.LOGGED_IN_MAGIC_FILE)
84 82
85 83
86 def chrome_crashed(watcher): 84 def chrome_crashed(watcher):
87 """Runs through the log watched by |watcher| to see if a crash was 85 """Runs through the log watched by |watcher| to see if a crash was
88 reported for chrome. 86 reported for chrome.
89 87
90 Returns True if so, False if not. 88 Returns True if so, False if not.
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 except (IOError, OSError) as error: 313 except (IOError, OSError) as error:
316 logging.error(error) 314 logging.error(error)
317 315
318 # Restart the UI. 316 # Restart the UI.
319 nuke_login_manager() 317 nuke_login_manager()
320 site_utils.poll_for_condition( 318 site_utils.poll_for_condition(
321 lambda: __session_manager_restarted(oldpid), 319 lambda: __session_manager_restarted(oldpid),
322 TimeoutError('Timed out waiting for logout'), 320 TimeoutError('Timed out waiting for logout'),
323 timeout) 321 timeout)
324 wait_for_login_prompt() 322 wait_for_login_prompt()
OLDNEW
« no previous file with comments | « no previous file | client/bin/site_ui_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698